This module implements the CurvatureAnalyze class to perform curvature analyses on molecular or periodic structures.

CurvatureAnalyzer class

class pychemcurv.analysis.CurvatureAnalyzer(structure, bond_tol=0.2, rcut=2.5, bond_order=None)[source]

This class provides helpful methods to analyze the local curvature on all atoms of a given structure. The structure is either a molecule or a periodic structure. Once the structure is read, the class determines the connectivity of the structure in order to define all vertices. The connectivity is defined on a distance criterion.

The class needs a pymatgen.Structure or pymatgen.Molecule object as first argument. The other arguments are used to defined if two atoms are bonded or not.

  • structure (Structure, Molecule) – A Structure or Molecule pymatgen objects
  • bond_tol (float) – Tolerance used to determine if two atoms are bonded. Look at pymatgen.core.CovalentBond.is_bonded.
  • rcut (float) – Cutoff distance in case the bond is not not known
  • bond_order (dict) – Not yet implemented

List of vertices associated to each atom of the molecule


Set of tuples of bonded atom index


List of tuples of the indexes of atoms in each vetex. The first index is atom A, the following are atoms of \(\star(A)\).


Return a Data Frame that contains all the geometric and hybridization data.


Returns the distance matrix between all atoms. For periodic structures, this returns the nearest image distances.

static from_file(path, periodic=None)[source]

Returns a CurvatureAnalyze object from the structure at the given path. This method relies on the file format supported with pymatgen Molecule and Structure classes.

Supported formats for periodic structure include CIF, POSCAR/CONTCAR, CHGCAR, LOCPOT, vasprun.xml, CSSR, Netcdf and pymatgen’s JSON serialized structures.

Supported formats for molecule include include xyz, gaussian input (gjf|g03|g09|com|inp), Gaussian output (.out|and pymatgen’s JSON serialized molecules.

  • path (str) – Path to the structure file
  • periodic (bool) – if True, assume that the file correspond to a periodic structure. Default is None. The method tries to read the file, first from the Molecule class and second from the Structure class of pymatgen.

Set up a model data dictionnary that contains species, coordinates and bonds of the structure. This dictionnary can be used as model data for further visulization in bio-dash.