mispr.lammps.fireworks package¶
Submodules¶
mispr.lammps.fireworks.core module¶
Define core fireworks for ambertools and lammps.
-
class mispr.lammps.fireworks.core.GetFFDictFW(mol, mol_operation_type, data, operation_type=
'get_from_esp'
, label=''
, name='get_ff_dict'
, parents=None
, working_dir=None
, db=None
, save_ff_to_db=False
, save_ff_to_file=True
, ff_filename='ff.json'
, tag='unknown'
, **kwargs)[source]¶ Bases:
Firework
Generate the ff parameters for a molecule.
- Parameters:¶
- mol : Molecule, GaussianOutput, str, dict¶
Source of the molecule to be processed. Should match the
mol_operation_type
.- mol_operation_type : str¶
The type of molecule operation. See
process_mol
defined inmispr/gaussian/utilities/mol.py
for supported operations.- data : str, dict¶
Data to be processed, e.g., path to the esp file if
operation_type
isget_from_esp
, path to the prmtop file ifoperation_type
isget_from_prmtop
, etc.- operation_type : str, optional¶
The operation to perform on the data to read or generate the force field parameters. Defaults to
get_from_esp
. Supported commands:get_from_esp
: If the input is an ESP file.get_from_prmtop
: If the input is a prmtop file.get_from_opls
: If the input is a molecule file to be used to generate opls ff parameters.get_from_dict
: If the input is a dictionary of force field parameters. e.g.,{ "Molecule": pymatgen_molecule, "Labels": atom_labels, "Masses": atomtype_masses, "Nonbond": nonbond_params, "Bonds": bond_params, "Angles": angle_params, "Dihedrals": dihedral_params, "Impropers": improper_params, "Improper Topologies": improper_topologies, "Charges": charges }
’get_from_file’: If the input is a json file of the force field parameters.
’get_from_db’: If the input is a filter for the database to search for the force field parameters.
- label : str, optional¶
Label for the molecule. This should be unique for each different molecular species in the system. Defaults to an empty string. In this case, the label will be obtained based on the molecular formula.
- name : str, optional¶
Name of the Firework. Defaults to
get_ff_dict
.- parents : Firework or [Firework], optional¶
List of parent Fireworks that this Firework depends on. Defaults to
None
.- working_dir : str, optional¶
Directory to run the Firework in. Defaults to the current working directory.
- db : str or dict, optional¶
Database credentials. Could be provided as the path to the “db.json” file or in the form of a dict. If none is provided, attempts to read it from the configuration files to save the Firework to.
- save_ff_to_db : bool, optional¶
Whether to save the force field to the database. Defaults to
False
.- save_ff_to_file : bool, optional¶
Whether to save the force field to a file. Defaults to
True
.- ff_filename : str, optional¶
Filename to save the force field to. Defaults to “ff.json”.
- tag : str¶
Tag for the Firework. The provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.
- **kwargs¶
Other kwargs that are passed to:
Firework.__init__
mispr.gaussian.firetasks.geo_transformation.ProcessMoleculeInput
mispr.lammps.firetasks.run.RunAntechamber
mispr.lammps.firetasks.run.RunParmchk
mispr.lammps.firetasks.write_inputs.WriteTleapScript
mispr.lammps.firetasks.run.RunTleap
mispr.lammps.firetasks.parse_outputs.ProcessPrmtop
mispr.lammps.firetasks.run.RunMaestro
mispr.lammps.firetasks.write_inputs.LabelFFDict
mispr.lammps.firetasks.write_inputs.LabelFFDictFromDB
-
class mispr.lammps.fireworks.core.RunAnalysisFW(md_property, name=
'run_analysis'
, parents=None
, working_dir=None
, tag='unknown'
, **kwargs)[source]¶ Bases:
Firework
Run an analysis on a LAMMPS trajectory.
- Parameters:¶
- md_property : str¶
The property to calculate. Supported properties:
’diffusion’: Calculate the diffusion coefficient.
’rdf’: Calculate the radial distribution function.
- name : str, optional¶
Name of the Firework. Defaults to “run_analysis”.
- parents : Firework or [Firework], optional¶
List of parent Fireworks that this Firework depends on. Defaults to
None
.- working_dir : str, optional¶
Directory to run the Firework in. Defaults to the current working directory.
- tag : str¶
Tag for the Firework. The provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.
- **kwargs¶
Other kwargs that are passed to:
Firework.__init__
mispr.lammps.firetasks.parse_outputs.CalcDiff
mispr.lammps.firetasks.parse_outputs.GetRDF
mispr.lammps.firetasks.parse_outputs.CalcDiff
-
class mispr.lammps.fireworks.core.RunLammpsFW(control_file=
None
, db=None
, name='run_lammps'
, parents=None
, working_dir=None
, save_run_to_db=True
, save_run_to_file=False
, tag='unknown'
, **kwargs)[source]¶ Bases:
Firework
Run a lammps simulation.
- Parameters:¶
- control_file : str, optional¶
Path to the control file. If not provided, the control file will be generated. Defaults to None.
- db : str or dict, optional¶
Database credentials. Could be provided as the path to the db.json file or in the form of a dict. If none is provided, attempts to read it from the configuration files to save the Firework to.
- name : str, optional¶
Name of the Firework. Defaults to “run_lammps”.
- parents : Firework or [Firework], optional¶
List of parent Fireworks that this Firework depends on. Defaults to
None
.- working_dir : str, optional¶
Directory to run the Firework in. Defaults to the current working directory.
- save_run_to_db : bool, optional¶
Whether to save the run to the database. Defaults to True.
- save_run_to_file : bool, optional¶
Whether to save the run to a file. Defaults to False.
- tag : str¶
Tag for the Firework. The provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.
- **kwargs¶
Other kwargs that are passed to:
Firework.__init__
mispr.lammps.firetasks.write_inputs.WriteControlFile
mispr.lammps.firetasks.run.RunLammpsDirect
- mispr.lammps.fireworks.core.ambertools_tasks(**kwargs)[source]¶
Define a list of common tasks for generating GAFF parameters for a molecule. This is a helper function for the GetFFDictFW Firework.
- Parameters:¶
- **kwargs¶
other kwargs that are passed to:
mispr.lammps.firetasks.run.RunAntechamber
mispr.lammps.firetasks.run.RunParmchk
mispr.lammps.firetasks.write_inputs.WriteTleapScript
mispr.lammps.firetasks.run.RunTleap
mispr.lammps.firetasks.parse_outputs.ProcessPrmtop
- Returns:¶
List of Firetasks.