cgexplore.analysis.GeomMeasure

class cgexplore.analysis.GeomMeasure(target_torsions=None)[source]

Bases: object

Class to perform geometry calculations.

Parameters:

target_torsions (Iterable[TargetTorsion] | None) – An iterable of TargetTorsion defining which torsions to capture if you run calculate_torsions.

Methods

calculate_angles

Calculate the angle values.

calculate_bonds

Calculate the bond lengths.

calculate_max_diameter

Calculate the maximum diameter of the molecule.

calculate_min_distance

Calculate the minimum distance between beads and centroid.

calculate_minb2b

Calculate the minimum distance between beads and beads.

calculate_radius_gyration

Calculate the radius of gyration.

calculate_torsions

Calculate the value of target torsions.

from_forcefield

Get the values in terms of forcefield terms.

classmethod from_forcefield(forcefield)[source]

Get the values in terms of forcefield terms.

Parameters:

forcefield (ForceField)

Return type:

Self

calculate_angles(molecule)[source]

Calculate the angle values.

Uses stko.molecule_analysis.GeometryAnalyser

Parameters:

molecule (Molecule) – The molecule to analyse.

Returns:

A dictionary of angle values organised by element strings.

Return type:

dict[tuple[str, str, str], list[float]]

calculate_bonds(molecule)[source]

Calculate the bond lengths.

Uses stko.molecule_analysis.GeometryAnalyser

Parameters:

molecule (Molecule) – The molecule to analyse.

Returns:

A dictionary of bond lengths organised by element strings.

Return type:

dict[tuple[str, str], list[float]]

calculate_max_diameter(molecule)[source]

Calculate the maximum diameter of the molecule.

Uses stko.molecule_analysis.GeometryAnalyser

Parameters:

molecule (Molecule) – The molecule to analyse.

Return type:

float

calculate_min_distance(molecule)[source]

Calculate the minimum distance between beads and centroid.

Parameters:

molecule (Molecule) – The molecule to analyse.

Returns:

The minimum distance.

Return type:

dict[str, float]

calculate_minb2b(molecule)[source]

Calculate the minimum distance between beads and beads.

Parameters:

molecule (Molecule) – The molecule to analyse.

Returns:

The minimum bead-to-bead distance.

Return type:

float

calculate_radius_gyration(molecule)[source]

Calculate the radius of gyration.

Uses stko.molecule_analysis.GeometryAnalyser

Parameters:

molecule (Molecule) – The molecule to analyse.

Return type:

float

calculate_torsions(molecule, absolute, as_search_string=False)[source]

Calculate the value of target torsions.

Parameters:
  • molecule (Molecule) – The molecule to analyse.

  • absolute (bool) – True to get the abs(torsion) from 0 degrees to 180 degrees.

  • as_search_string (bool) – Changes the key of the returned dictionary to be defined by the search string used in target_torsions or as the found atom element strings.

Returns:

A dictionary of torsion values organised by element strings.

Return type:

dict[str, list[float]]