You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parser=argparse.ArgumentParser(description='Run preprocessing tools for LAMMPS simulation using fix bond/react')
28
30
29
31
# List of arguments for command line
30
32
parser.add_argument('directory', metavar='directory', type=str, nargs=1, help='Directory of file(s), can be found in bash with . or $PWD')
31
-
parser.add_argument('tool', metavar='tool', type=str, nargs=1, choices=['clean', 'molecule', 'molecule-partial', 'lammps-partial'], help='Name of tool to be used. Possible tools: clean, molecule, molecule-partial, lammps-partial')
32
-
parser.add_argument('data_files', metavar='data_files', nargs='+', help='Name of file to be acted on. If tool is "clean" this can be a list of files')
33
+
parser.add_argument('tool', metavar='tool', type=str, nargs=1, choices=['clean', 'molecule', 'molecule-partial', 'lammps-partial', 'map'], help='Name of tool to be used. Possible tools: clean, molecule, molecule-partial, lammps-partial, map')
34
+
parser.add_argument('data_files', metavar='data_files', nargs='+', help='Name of file(s) to be acted on. If tool is "map" then this must be two files ordered as pre-bond post-bond. If "clean" this can be a list of files in any order')
33
35
parser.add_argument('--coeff_file', metavar='coeff_file', nargs=1, help='Argument for the "clean" tool: a coefficients file to be cleaned')
34
-
parser.add_argument('--save_name', metavar='save_name', nargs=1, help='Argument for "molecule", "molecule-partial" and "lammps-partial" tools: sets the file name for the new file')
35
-
parser.add_argument('--ba', metavar='bonding_atoms', nargs=2, help='Argument for "molecule", "molecule-partial" and "lammps-partial" tools: atom IDs of the atoms that will be involved in creating a new bond')
36
-
parser.add_argument('--ebt', metavar='elements_by_type', nargs='+', help='Argument for "molecule-partial" and "lammps-partial" tools: list of elements symbols in the same order as the types specified in the data file')
37
-
parser.add_argument('--da', metavar='delete_atoms', nargs='+', help='Argument for "molecule", "molecule-partial" and "lammps-partial" tools: atom IDs of the atoms that will be deleted after the bond has formed')
36
+
parser.add_argument('--save_name', metavar='save_name', nargs=1, help='Argument for "molecule", "molecule-partial" and "lammps-partial" tools: a prefix that is added to "molecule.data" for the file name of the new file')
37
+
parser.add_argument('--ba', metavar='bonding_atoms', nargs=2, help='Argument for "molecule", "molecule-partial" and "lammps-partial" tools: atom IDs of the atoms that will be involved in creating a new bond, separated by white space. Order of atoms must be the same between molecule files, when mapping.')
38
+
parser.add_argument('--ebt', metavar='elements_by_type', nargs='+', help='Argument for "molecule-partial", "lammps-partial" and "map" tools: series of elements symbols in the same order as the types specified in the data file and separated with a whitespace')
39
+
parser.add_argument('--da', metavar='delete_atoms', nargs='+', help='An optional argument for "molecule", "molecule-partial" and "lammps-partial" tools: atom IDs of the atoms that will be deleted after the bond has formed, separated by white space')
40
+
parser.add_argument('--debug', action='store_true', help='Argument for "map": prints debugging statements highlighting which parts of the path search determine a mapped atom pair')
This is an example using the fictional reaction between phenol and an alkane with H2 given as a byproduct. I will likely replace this with a better example later, once I have a good intricate one that bonds quickly in LAMMPS.
2
+
3
+
Commands to generate an 'automap.data' file are as follows:
AutoMapper.py . molecule-partial cleanedpre_reaction.data --save_name pre- --ba 13 14 --da 12 19 --ebt H H C C O O
10
+
11
+
Create post-bond partial molecule file
12
+
AutoMapper.py . molecule-partial cleanedpost_reaction.data --save_name post- --ba 13 14 --da 23 24 --ebt H H C C O O
13
+
14
+
NOTE: for both these molecule files the bonding atom order represents the same atoms in each file i.e. the 13 is the reacting oxygen and 14 is the reacting carbon. The order of the atoms should always be the same.
15
+
16
+
Create the map
17
+
AutoMapper.py . map pre-molecule.data post-molecule.data --ebt H H C C O O
18
+
19
+
NOTE: the order of files for the map should always be "pre-bond molecule post-bond molecule".
20
+
21
+
Run the LAMMPS code
22
+
lmp -in run.bond
23
+
24
+
You should see the 0 turn to a 1 next to the step count in the thermo output.
0 commit comments