cgexplore.analysis.ShapeMeasure

class cgexplore.analysis.ShapeMeasure(output_dir, shape_path, shape_string=None)[source]

Bases: object

Uses Shape to calculate the shape of coordinates.

Shape: http://www.ee.ub.edu/

Methods

calculate

Calculate shape measures for a molecule.

calculate_from_centroids

Calculate shape from the centroids of building blocks.

fill_position_matrix_molecule

Make position matrix from filtering molecule based on element.

get_shape_molecule_byelements

Get molecule to analyse by filtering by element.

reference_shape_dict

Reference shapes as dictionary.

Parameters:
calculate(molecule)[source]

Calculate shape measures for a molecule.

Parameters:

molecule (Molecule)

Return type:

dict

calculate_from_centroids(constructed_molecule, target_atmnums)[source]

Calculate shape from the centroids of building blocks.

Currently not implemented well.

Parameters:
  • constructed_molecule (ConstructedMolecule)

  • target_atmnums (Sequence[int])

Return type:

dict

fill_position_matrix_molecule(molecule, elements, old_position_matrix)[source]

Make position matrix from filtering molecule based on element.

Parameters:
  • molecule (Molecule)

  • elements (str | Sequence[str])

  • old_position_matrix (ndarray)

Return type:

tuple[list, list]

get_shape_molecule_byelements(molecule, elements, expected_points)[source]

Get molecule to analyse by filtering by element.

Parameters:
Return type:

Molecule | None

reference_shape_dict()[source]

Reference shapes as dictionary.

Return type:

dict[str, dict]