diff --git a/.gitignore b/.gitignore index cd95c65ed..bedde96e5 100755 --- a/.gitignore +++ b/.gitignore @@ -24,8 +24,6 @@ autode/conformers/cconf_gen.c autode/solvent/csolvent.c -examples/ - doc/_build/ .DS_Store @@ -35,119 +33,7 @@ tests/htmlcov/ htmlcov/ -tests/data/pes2d/SN2_PES_const_opt_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_0-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_1-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_2-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_3-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_4-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_5-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_6-6_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-0_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-1_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-2_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-3_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-4_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-5_xtb.xyz - -tests/data/pes2d/SN2_PES_scan_7-6_xtb.xyz +tests/data/pes2d/*.xyz tests/data/template_ts_guess_constrained_opt_ll_xtb.xyz diff --git a/README.md b/README.md index 0c8c0ee0d..453d6baa0 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Broadly, **autodE** is invoked by first setting appropriate parameters in config Then, initialising _Reactant_ and _Product_ objects, generating a _Reaction_ object from those and invoking a method e.g. _locate_transtion_state()_ or _calculate_reaction_profile()_. For example, the 1,2 hydrogen shift in a propyl radical -``` +```python from autode import * Config.n_cores = 8 diff --git a/examples/addition_elimination.py b/examples/addition_elimination.py new file mode 100644 index 000000000..d961d4936 --- /dev/null +++ b/examples/addition_elimination.py @@ -0,0 +1,28 @@ +from autode import * +from autode.molecule import product_to_reactant + +Config.n_cores = 8 + +# For hydroxide to be not too reactive in solution requires diffuse functions +Config.ORCA.keywords.low_opt = ['PBE0', 'D3BJ', 'LooseOpt', 'ma-def2-SVP'] +Config.ORCA.keywords.hess = ['PBE0', 'D3BJ', 'Freq', 'ma-def2-SVP'] +Config.ORCA.keywords.opt = ['PBE0', 'D3BJ', 'LooseOpt', 'ma-def2-SVP'] + +# Set up the first step in the hydrolysis of the ester, attack of OH- to get a tetrahedral intermediate +r1 = Reactant(name='ester', smiles='CC(OC)=O') +r2 = Reactant(name='hydroxide', smiles='[OH-]') +tet_int = Product(name='tet_intermediate', smiles='CC([O-])(OC)O') + +step1 = Reaction(r1, r2, tet_int, solvent_name='water') + +# Second step is collapse of the tetrahedral intermediate to the acid and methoxide +tet_int = product_to_reactant(tet_int) +p1 = Product(name='acid', smiles='CC(O)=O') +p2 = Product(name='methodixe', smiles='[O-]C') + +step2 = Reaction(tet_int, p1, p2, solvent_name='water') + +# Calculate the reactions in sequence, so the conformers of the tetrahedral +# intermediate do not need to be found again +reaction = MultiStepReaction(step1, step2) +reaction.calculate_reaction_profile() diff --git a/examples/carbonyl_addition.py b/examples/carbonyl_addition.py new file mode 100644 index 000000000..7da42aae2 --- /dev/null +++ b/examples/carbonyl_addition.py @@ -0,0 +1,9 @@ +from autode import Reactant, Product, Reaction, Config +Config.n_cores = 4 + +r1 = Reactant(smiles='CC(C)=O', name='acetone') +r2 = Reactant(smiles='[C-]#N', name='cn-') +p = Product(smiles='CC([O-])(C#N)C', name='prod') + +reaction = Reaction(r1, r2, p, solvent_name='water') +reaction.calculate_reaction_profile() diff --git a/examples/cope_rearrangement.py b/examples/cope_rearrangement.py new file mode 100644 index 000000000..53c04685c --- /dev/null +++ b/examples/cope_rearrangement.py @@ -0,0 +1,9 @@ +from autode import * + +Config.n_cores = 8 + +reactant = Reactant(name='3,4-dimethylhexa-1,5-diene', smiles='C=C[C@H](C)[C@@H](C)C=C') +product = Product(name='octa-2,6-diene', smiles='C/C=C/CC/C=C/C') + +reaction = Reaction(reactant, product, name='cope_rearrangement') +reaction.calculate_reaction_profile() diff --git a/examples/diels_alder.py b/examples/diels_alder.py new file mode 100644 index 000000000..7f999195f --- /dev/null +++ b/examples/diels_alder.py @@ -0,0 +1,10 @@ +from autode import * + +Config.n_cores = 2 + +butadiene = Reactant(name='butadiene', smiles='C=CC=C') +ethene = Reactant(name='ethene', smiles='C=C') +cyclohexene = Product(name='cyclohexene', smiles='C1C=CCCC1') + +reaction = Reaction(butadiene, ethene, cyclohexene, name='diels_alder') +reaction.calculate_reaction_profile() diff --git a/examples/elimination.py b/examples/elimination.py new file mode 100644 index 000000000..505c55760 --- /dev/null +++ b/examples/elimination.py @@ -0,0 +1,13 @@ +from autode import * + +Config.n_cores = 2 + +methoxide = Reactant(name='methoxide', smiles='C[O-]') +propyl_chloride = Reactant(name='propyl_chloride', smiles='CCCCl') +chloride = Product(name='Cl-', smiles='[Cl-]') +propene = Product(name='propene', smiles='CC=C') +methanol = Product(name='methanol', smiles='CO') + +reaction = Reaction(methoxide, propyl_chloride, chloride, propene, methanol, + name='elimination', solvent_name='water') +reaction.calculate_reaction_profile() diff --git a/examples/sn2.py b/examples/sn2.py new file mode 100644 index 000000000..08f49f0ce --- /dev/null +++ b/examples/sn2.py @@ -0,0 +1,11 @@ +from autode import * + +Config.n_cores = 2 + +flouride = Reactant(name='F-', smiles='[F-]') +methyl_chloride = Reactant(name='CH3Cl', smiles='ClC') +chloride = Product(name='Cl-', smiles='[Cl-]') +methyl_flouride = Product(name='CH3F', smiles='CF') + +reaction = Reaction(flouride, methyl_chloride, chloride, methyl_flouride, name='sn2', solvent_name='water') +reaction.calculate_reaction_profile()