compechem.systems
sub-module#
System
class#
- class compechem.systems.System(filepath, charge=0, spin=1, box_side=None)#
The System object describes a generic molecular system described at a given level of theory. A system is defined based on a molecular geometry, a charge, a spin multiplicity and, one a level of theory is selected, by a set of computed properties.
- Parameters:
filepath (str) – The path to the file containing the system geometry or data
charge (int, optional) – The total charge of the system. (Default: 0 neutral)
spin (int, optional) – The total spin multiplicity of the system. (Default: 1 singlet)
box_side (float, optional) – For periodic systems, defines the length (in Å) of the box side
- Raises:
ValueError – Exception raised when the .xyz file path is invalid
- property is_periodic: bool#
Indicates if the system is periodic or not
- Returns:
True if the system is periodic (the box_side is not None), False otherwise.
- Return type:
bool
- save_json(path)#
Saves a JSON representation of the object that can be stored on disk and loaded (using the class constructor with the option SupportedTypes.JSON) at a later time to re-generate ad identical System object.
- Parameters:
path (str) – The path to the .json file that must be created.
- Return type:
None
- write_gen(gen_file, box_side=None)#
Writes the current geometry to a .gen file.
- Parameters:
gen_file (str) – path to the output .gen file
box_side (float, optional) – for periodic systems, defines the length (in Å) of the box side
Ensemble
class#
- class compechem.systems.Ensemble(systems)#
Ensemble object, containing a series of System objects.
- Parameters:
systems (List[System]) – The list of System objects to be included in the Ensemble.
- name#
Name of the system represented in the ensemble, taken from the first element of the ensemble
- Type:
str
- properties#
The property archive containing the average ensamble properties calculated at various levels of theory.
- Type:
PropertiesArchive
- add(systems)#
Append more Systems to the ensemble
- Parameters:
systems (List[System]) – The list of systems to be added to the ensamble
- property atomcount: int#
The number of atoms in the system
- Returns:
The total number of atoms
- Return type:
int
- boltzmann_average(temperature=297.15)#
Calculates the average free Helmholtz energy of the ensemble (in Hartree), weighted for each molecule by its Boltzmann factor.
- Parameters:
temperature (float) – temperature at which to calculate the Boltzmann average, by default 297.15 K
- Returns:
float – The total Helmholtz free energy of the ensemble.
NOTE (the vibronic contributions are included in the electronic component, which)
actually contains the TOTAL energy of the system. Maybe in the future I’ll think of
how to separate the two contributions - LB
- Return type:
float