minihf.molecule.molecule module
- class minihf.molecule.molecule.Molecule(atoms=None, charge=0, multiplicity=1)[source]
Bases:
objectMolecule class representing a collection of atoms
- bond_angle(i, j, k)[source]
- Calculate the bond angle between atoms i,j,k.
Where atom j is the central atom.
- dihedral_angle(i, j, k, l)[source]
Calculate dihedral angle for atom connectivity A,B,C,D.
- Parameters:
- Returns:
Dihedral angle in degrees (-180 to 180)
- Return type:
- Raises:
TypeError – If index of atom is not int.
ValueError – If index of atom is not zero or positive number. If index of atom is not smaller than number of atoms.
- property nelec
Number of total electrons in the molecule.
- property nalpha
Number of alpha electrons in the molecule.
- property nbeta
Number of beta electrons in the molecule.
- property energy_nuc
Nucelar repulsion energy.
- Returns:
energy – Nuclear repulsion energy.
- Return type:
- property atom_coords
Get all atomic coordinates as Nx3 array
- property atom_masses
Get all atomic masses as Nx1 array
- property atom_numbers
Get all atomic numbers as Nx1 array
- property atom_symbols
Get all atomic symbols as Nx1 array
- property mass
Get total molecular mass
- property center_of_mass
Calculate the center of mass for molecular.
- Returns:
[x, y, z] coordinates of center of mass
- Return type:
np.ndarray