matscipy.molecules

Classes that deal with interactions defined by connectivity.

Classes

Molecules([bonds_connectivity, bonds_types, ...])

Similar to ase.Atoms, but for molecular data.

class matscipy.molecules.Molecules(bonds_connectivity=None, bonds_types=None, angles_connectivity=None, angles_types=None, dihedrals_connectivity=None, dihedrals_types=None)

Bases: object

Similar to ase.Atoms, but for molecular data.

Methods

from_atoms(atoms)

Construct a Molecules object from ase.Atoms object.

get_angles(atoms)

Compute angles (degrees) for all angles.

get_dihedrals(atoms)

Compute angles (degrees) for all dihedrals.

get_distances(atoms)

Compute distances for all bonds.

__init__(bonds_connectivity=None, bonds_types=None, angles_connectivity=None, angles_types=None, dihedrals_connectivity=None, dihedrals_types=None)

Initialize with connectivity data.

Parameters:
  • bonds_connectivity (ArrayLike) – Array defining bonds with atom ids. Expected shape is (nbonds, 2).

  • bonds_types (ArrayLike) – Array defining the bond types. Expected shape is nbonds.

  • angles_connectivity (ArrayLike) – Array defining angles with atom ids. Expected shape is (nangles, 3).

  • angles_types (ArrayLike) – Array defining the angle types. Expected shape is nangles.

  • dihedrals_connectivity (ArrayLike) – Array defining angles with atom ids. Expected shape is (ndihedrals, 3).

  • dihedrals_types (ArrayLike) – Array defining the dihedral types. Expected shape is ndihedrals.

get_distances(atoms) ndarray

Compute distances for all bonds.

get_angles(atoms) ndarray

Compute angles (degrees) for all angles.

get_dihedrals(atoms) ndarray

Compute angles (degrees) for all dihedrals.

static from_atoms(atoms: Atoms)

Construct a Molecules object from ase.Atoms object.