mispr.gaussian.fireworks package

Submodules

mispr.gaussian.fireworks.break_mol module

Define firework used to break a molecule and run its fragments.

class mispr.gaussian.fireworks.break_mol.BreakMolFW(mol, mol_operation_type='get_from_mol', bonds=None, open_rings=False, ref_charge=0, fragment_charges=None, calc_frags=True, db=None, name='break_mol', parents=None, working_dir=None, tag='unknown', **kwargs)[source]

Bases: Firework

Process a molecule input, break it into unique fragments, and generate a set of optimization and frequency calculations for each fragment (optional).

Parameters:
mol : Molecule, GaussianOutput, str, dict

Source of the molecule to be processed. Should match the mol_operation_type.

mol_operation_type : str, optional

The type of molecule operation. See process_mol defined in mispr/gaussian/utilities/mol.py for supported operations. Defaults to get_from_mol.

bonds : list, optional

List of tuples of the bonds to break; e.g. [(0, 1), (1, 2)] will break the bonds between atoms 0 and 1 and between atoms 1 and 2; if none is specified, will attempt to break all bonds.

open_rings : bool, optional

Whether to open rings; if set to True, will perform local optimization to get a good initial guess for the structure. Defaults to False.

ref_charge : int, optional

Charge on the principle molecule. Defaults to 0.

fragment_charges : list, optional

List of charges to assign to the fragments in addition to the ones already assigned; refer to mispr.gaussian.firetasks.geo_transformation.BreakMolecule for more details.

calc_frags : bool, optional

Whether to create optimization and frequency Fireworks for the generated fragments. Defaults to True.

db : str or dict, optional

Database credentials.

name : str, optional

Name of the Firework. Defaults to break_mol.

parents : Firework or [Firework]

List of parent FWs this FW depends on.

working_dir : str, optional

Working directory for the calculation; will use the current working directory if not specified.

tag : str, optional

Tag for the calculation; the provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.

**kwargs

Other kwargs that are passed to:

  1. Firework.__init__.

  2. mispr.gaussian.firetasks.geo_transformation.ProcessMoleculeInput

  3. mispr.gaussian.firetasks.geo_transformation.BreakMolecule

mispr.gaussian.fireworks.core module

Define common fireworks used in Gaussian workflows.

class mispr.gaussian.fireworks.core.CalcFromMolFW(mol, mol_operation_type='get_from_mol', db=None, name='calc_from_mol', parents=None, working_dir=None, input_file='mol.com', output_file='mol.out', gaussian_input_params={}, cart_coords=True, oxidation_states=None, tag='unknown', **kwargs)[source]

Bases: Firework

Run a Gaussian calculation from 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, optional

The type of molecule operation. See process_mol defined in mispr/gaussian/utilities/mol.py for supported operations. Defaults to get_from_mol.

db : str or dict, optional

Database credentials; could be provided as the path to the db.json file or in the form of a dictionary; if none is provided, attempts to get it from the configuration files.

name : str, optional

Name of the Firework. Defaults to calc_from_mol.

parents : Firework or [Firework], optional

List of parent FWs this FW depends on.

working_dir : str, optional

Working directory for the calculation; defaults to the current directory.

input_file : str, optional

Name of the Gaussian input file to be created; defaults to “mol.com”.

output_file : str, optional

Name of the Gaussian output file to be output; defaults to “mol.out”.

gaussian_input_params : dict, optional

Dictionary of parameters to be used in the Gaussian input file.

cart_coords : bool, optional

Whether the coordinates are cartesian or z-matrix. Defaults to True.

oxidation_states : list, optional

List of oxidation states for each atom; defaults to None.

tag : str, optional

Tag for the calculation; the provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.

**kwargs

other kwargs that are passed to:

  1. Firework.__init__.

  2. mispr.gaussian.firetasks.geo_transformation.ProcessMoleculeInput

  3. mispr.gaussian.fireworks.common_tasks

class mispr.gaussian.fireworks.core.CalcFromRunsDBFW(db=None, name='calc_from_runs_db', parents=None, gaussian_input_params=None, working_dir=None, input_file='mol.com', output_file='mol.out', cart_coords=True, tag='unknown', **kwargs)[source]

Bases: Firework

Run a Gaussian calculation from a previous calculation or the runs database.

Parameters:
db : str or dict, optional

Database credentials; could be provided as the path to the db.json file or in the form of a dictionary; if none is provided, attempts to get it from the configuration files.

name : str, optional

Name of the Firework. Defaults to calc_from_runs_db.

parents : Firework or [Firework], optional

List of parent FWs this FW depends on.

gaussian_input_params : dict, optional

Dictionary of parameters to be used in the Gaussian input file.

working_dir : str, optional

Working directory for the calculation; defaults to the current directory.

input_file : str, optional

Name of the Gaussian input file to be created; defaults to “mol.com”.

output_file : str, optional

Name of the Gaussian output file to be output; defaults to “mol.out”.

cart_coords : bool, optional

Whether the coordinates are cartesian or z-matrix. Defaults to True.

tag : str, optional

Tag for the calculation; the provided tag will be stored in the db documents for easy retrieval. Defaults to “unknown”.

**kwargs

other kwargs that are passed to:

  1. Firework.__init__.

  2. mispr.gaussian.firetasks.parse_outputs.RetrieveGaussianOutput

  3. mispr.gaussian.fireworks.common_tasks

mispr.gaussian.fireworks.core.common_tasks(db, input_file, output_file, gaussian_input_params, cart_coords, oxidation_states, **kwargs)[source]

Define a list of common tasks for Gaussian fireworks, i.e. writing an input file, running the calculation, and parsing the output.

Parameters:
db : str or dict

Database credentials to store the run; could be provided as the path to the db.json file or in the form of a dictionary.

input_file : str

Name of the input file to be written.

output_file : str

name of the Gaussian output file

gaussian_input_params : dict

A dictionary of parameters to be used in creating the Gaussian input file.

cart_coords : bool

Whether to write cartesian coordinates or not; default is True.

oxidation_states : dict

A dictionary of element symbols and their oxidation states used in setting the charge on the molecule.

**kwargs

other kwargs that are passed to:

  1. mispr.gaussian.firetasks.write_inputs.WriteInput

  2. mispr.gaussian.firetasks.run_calc.RunGaussianCustodian

  3. mispr.gaussian.firetasks.parse_outputs.ProcessRun

Returns:

List of Firetasks.

Module contents