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')
30
+
31
+
# List of arguments for command line
32
+
parser.add_argument('directory', metavar='directory', type=str, nargs=1, help='Directory of file(s), can be found in bash with . or $PWD')
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')
35
+
parser.add_argument('--coeff_file', metavar='coeff_file', nargs=1, help='Argument for the "clean" tool: a coefficients file to be cleaned')
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')
41
+
42
+
# Get arguments from parser
43
+
args=parser.parse_args()
44
+
# Take compulsory args out of list - other args done later
45
+
tool=args.tool[0]
46
+
directory=args.directory[0]
47
+
48
+
49
+
# Throw errors if arguments are missing from certain tools
0 commit comments