@@ -100,6 +100,83 @@ def __init__(self,
100
100
** kwargs )
101
101
102
102
103
+ class ForceFW (Firework ):
104
+ def __init__ (
105
+ self ,
106
+ molecule = None ,
107
+ name = "force calculation" ,
108
+ qchem_cmd = ">>qchem_cmd<<" ,
109
+ multimode = ">>multimode<<" ,
110
+ max_cores = ">>max_cores<<" ,
111
+ qchem_input_params = None ,
112
+ db_file = None ,
113
+ parents = None ,
114
+ ** kwargs
115
+ ):
116
+ """
117
+ Converge the electron density and calculate the atomic forces, aka the gradient.
118
+ Args:
119
+ molecule (Molecule): Input molecule.
120
+ name (str): Name for the Firework.
121
+ qchem_cmd (str): Command to run QChem. Supports env_chk.
122
+ multimode (str): Parallelization scheme, either openmp or mpi. Defaults to openmp.
123
+ max_cores (int): Maximum number of cores to parallelize over. Supports env_chk.
124
+ qchem_input_params (dict): Specify kwargs for instantiating the input set parameters.
125
+ Basic uses would be to modify the default inputs of the set,
126
+ such as dft_rung, basis_set, pcm_dielectric, scf_algorithm,
127
+ or max_scf_cycles. See pymatgen/io/qchem/sets.py for default
128
+ values of all input parameters. For instance, if a user wanted
129
+ to use a more advanced DFT functional, include a pcm with a
130
+ dielectric of 30, and use a larger basis, the user would set
131
+ qchem_input_params = {"dft_rung": 5, "pcm_dielectric": 30,
132
+ "basis_set": "6-311++g**"}. However, more advanced customization
133
+ of the input is also possible through the overwrite_inputs key
134
+ which allows the user to directly modify the rem, pcm, smd, and
135
+ solvent dictionaries that QChemDictSet passes to inputs.py to
136
+ print an actual input file. For instance, if a user wanted to
137
+ set the sym_ignore flag in the rem section of the input file
138
+ to true, then they would set qchem_input_params = {"overwrite_inputs":
139
+ "rem": {"sym_ignore": "true"}}. Of course, overwrite_inputs
140
+ could be used in conjuction with more typical modifications,
141
+ as seen in the test_double_FF_opt workflow test.
142
+ db_file (str): Path to file specifying db credentials to place output parsing.
143
+ parents ([Firework]): Parents of this particular Firework.
144
+ **kwargs: Other kwargs that are passed to Firework.__init__.
145
+ """
146
+
147
+ qchem_input_params = qchem_input_params or {}
148
+ input_file = "mol.qin"
149
+ output_file = "mol.qout"
150
+ t = []
151
+ t .append (
152
+ WriteInputFromIOSet (
153
+ molecule = molecule ,
154
+ qchem_input_set = "ForceSet" ,
155
+ input_file = input_file ,
156
+ qchem_input_params = qchem_input_params ,
157
+ )
158
+ )
159
+ t .append (
160
+ RunQChemCustodian (
161
+ qchem_cmd = qchem_cmd ,
162
+ multimode = multimode ,
163
+ input_file = input_file ,
164
+ output_file = output_file ,
165
+ max_cores = max_cores ,
166
+ job_type = "normal" ,
167
+ )
168
+ )
169
+ t .append (
170
+ QChemToDb (
171
+ db_file = db_file ,
172
+ input_file = input_file ,
173
+ output_file = output_file ,
174
+ additional_fields = {"task_label" : name },
175
+ )
176
+ )
177
+ super (ForceFW , self ).__init__ (t , parents = parents , name = name , ** kwargs )
178
+
179
+
103
180
class OptimizeFW (Firework ):
104
181
def __init__ (self ,
105
182
molecule = None ,
0 commit comments