rmgpy.qm.molecule¶
- class rmgpy.qm.molecule.Geometry(settings, unique_id, molecule, unique_id_long=None)¶
A geometry, used for quantum calculations.
Created from a molecule. Geometry estimated by RDKit.
The attributes are:
Attribute
Type
Description
settings
QMSettings
Settings for QM calculations
unique_id
str
A short ID such as an augmented InChI Key
molecule
Molecule
RMG Molecule object
unique_id_long
str
A long, truly unique ID such as an augmented InChI
- generate_rdkit_geometries()¶
Use RDKit to guess geometry.
Save mol files of both crude and refined. Saves coordinates on atoms.
- get_crude_mol_file_path()¶
Returns the path of the crude mol file.
- get_file_path(extension, scratch=True)¶
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
- get_refined_mol_file_path()¶
Returns the path the the refined mol file.
- rd_build()¶
Import rmg molecule and create rdkit molecule with the same atom labeling.
- rd_embed(rdmol, num_conf_attempts)¶
Embed the RDKit molecule and create the crude molecule file.
- save_coordinates_from_qm_data(qmdata)¶
Save geometry info from QMData (eg CCLibData)
- unique_id¶
A short unique ID such as an augmented InChI Key.
- unique_id_long¶
Long, truly unique, ID, such as the augmented InChI.
- class rmgpy.qm.molecule.QMMolecule(molecule, settings)¶
A base class for QM Molecule calculations.
Specific programs and methods should inherit from this and define some extra attributes and methods:
output_file_extension
input_file_extension
generate_qm_data() …and whatever else is needed to make this method work.
The attributes are:
Attribute
Type
Description
molecule
Molecule
RMG Molecule object
settings
QMSettings
Settings for QM calculations
unique_id
str
A short ID such as an augmented InChI Key
unique_id_long
str
A long, truly unique ID such as an augmented InChI
- calculate_chirality_correction()¶
Returns the chirality correction to entropy (R*ln(2) if chiral) in J/mol/K.
- calculate_thermo_data()¶
Calculate the thermodynamic properties.
Stores and returns a ThermoData object as self.thermo. self.qm_data and self.point_group need to be generated before this method is called.
- check_paths()¶
Check the paths in the settings are OK. Make folders as necessary.
- check_ready()¶
Check that it’s ready to run calculations.
- create_geometry()¶
Creates self.geometry with RDKit geometries
- determine_point_group()¶
Determine point group using the SYMMETRY Program
Stores the resulting
PointGroup
in self.point_group
- generate_qm_data()¶
Calculate the QM data somehow and return a CCLibData object, or None if it fails.
- generate_thermo_data()¶
Generate Thermo Data via a QM calc.
Returns None if it fails.
- get_augmented_inchi_key(backend='rdkit-first')¶
Returns the augmented InChI from self.molecule
- get_file_path(extension, scratch=True)¶
Returns the path to the file with the given extension.
The provided extension should include the leading dot. If called with scratch=False then it will be in the fileStore directory, else scratch=True is assumed and it will be in the scratchDirectory directory.
- get_mol_file_path_for_calculation(attempt)¶
Get the path to the MOL file of the geometry to use for calculation attempt.
If attempt <= self.script_attempts then we use the refined coordinates, then we start to use the crude coordinates.
- get_thermo_file_path()¶
Returns the path the thermo data file.
- initialize()¶
Do any startup tasks.
- property input_file_path¶
Get the input file name.
- load_thermo_data()¶
Try loading a thermo data from a previous run.
- property max_attempts¶
The total number of attempts to try
- property output_file_path¶
Get the output file name.
- parse()¶
Parses the results of the Mopac calculation, and returns a QMData object.
- save_thermo_data()¶
Save the generated thermo data.
- property script_attempts¶
The number of attempts with different script keywords