matmacore.mol module
- class matmacore.mol.Mol(path=None)[source]
Bases:
objectA class that can parse log files from different Computational Software. It can parse log files from Gaussian 16, xvg files from Gromacs, out files from ORCA, and log files from CP2K.
- connectivity_matrix(distXX=1.65, distXH=1.15)[source]
Creates a connectivity matrix of the molecule. A connectivity matrix holds the information of which atoms are bonded and to what.
- Parameters:
distXX – The max distance between two atoms (not hydrogen) to be considered a bond
distXH – The max distance between any atom and a hydrogen atom to be considered a bond
- cp2k(file=None, job_type='md', colvar=None, timestep=None)[source]
Parses information from CP2K. Right now only works for AIMD Trajectories, plan to implement opt compatability later.
- Parameters:
job_type – (string) Currently only md is supported. Should be manually specified.
colvar – (list) A list containing the atom numbers that define your collective variable.
timestep – (float) Timestep of your MD calculation. The function will attempt to extract this from your input file if present.
traj_file – (string) File containing the CP2K trajectory.
input_file – (string) File containing your CP2K inputs.
output_file – (string) File containing your CP2K output.
- csv(file, skiprows=1, dtype=<class 'float'>, delimiter: str = ', ')[source]
Parses a csv file and appends the data to the mol object
- Parameters:
file – (string) File containing the csv data.
skiprows – (int) Number of rows to skip
dtype – (type) Data type
delimiter – (str) Delimiter
- element_symbol()[source]
A dictionary for atomic number and atomic symbol :param A: either atomic number or atomic symbol for Hydrogen, Carbon, Nitrogen, Oxygen, Fluorine and Silicon :return: the corresponding atomic symbol or atomic number
- gaussian()[source]
Parses log files from Gaussian 16 and appends information inside the log file to the mol object.
- class matmacore.mol.Reaction(mol_list, mol_label)[source]
Bases:
objectA class that organizes several molecules into a reaction
- static combiner(mol_list)[source]
Adds the energies for multiple molecules and returns a new mol object.
- Parameters:
mol_list – (list) List of molecule objects.
- Returns:
mol
- create_mol_list()[source]
Creates Mol objects from user-specified groups of directories and labels.
- Parameters:
*groups – Variable number of groups, where each group is a list of directories followed by a label.
- Returns:
List of Mol objects. mol_label (list): List of labels for the Mol objects.
- Return type:
mol_list (list)
- create_reaction_list()[source]
Creates a standardized reaction list with names from input definitions.
- Parameters:
*reaction_definitions – Variable number of reaction definitions where each is: (reaction_name, [dir1, dir2, ‘label’], [dir3, ‘label’], …)
- Returns:
[(reaction_name, mol_list, labels), …]
- Return type:
list