Molecule Module¶
Molecules¶
- class czone.molecule.molecule.BaseMolecule(species=None, positions=None, **kwargs)¶
Bases:
abc.ABC
Base abstract class for Molecule objects.
Molecule objects are intended to facilitate molecular atomic items, which are not easily generated in the Generation-Volume pair scheme. They are also intended to facilitate applications, for example, in surface chemistry studies. The molecule class mostly interfaces with other packages more suited for molecular generation.
BaseMolecules are typically not created directly.
- atoms¶
Nx3 array of atom positions of atoms in molecule
- Type
np.ndarray
- species¶
Nx1 array of atomic numbers of atom in molecule
- Type
np.ndarray
- origin¶
Reference origin of molecule.
- Type
np.ndarray
- orientation¶
Reference orientation of molecule.
- Type
np.ndarray
- priority¶
Relative generation precedence of molecule.
- Type
int
- ase_atoms¶
Collection of atoms in molecule as ASE Atoms object
- Type
Atoms
- property ase_atoms¶
Collection of atoms in molecule as ASE Atoms object.
- property atoms¶
Array of atomic positions of atoms lying within molecule.
- checkIfInterior(testPoints: numpy.ndarray)¶
- classmethod from_ase_atoms(atoms)¶
- from_molecule(**kwargs)¶
Constructor for new Molecules from existing Molecule object
- Parameters
**kwargs – “transformation”=List[BaseTransformation] to apply a series of transformations to the copied molecule.
- classmethod from_pmg_molecule(atoms)¶
- property orientation¶
- property origin¶
- populate_atoms()¶
- property print_warnings¶
- property priority¶
Relative generation precedence of molecule.
- remove_atoms(indices, new_origin_idx=None)¶
- reset_orientation()¶
Reset orientation to align with global XYZ. Does not transform molecule.
- set_atoms(species, positions)¶
- set_origin(point=None, idx=None) None ¶
Set the reference origin to global coordinate or to track specific atom.
- Parameters
point (np.ndarray) –
idx (int) –
- property species¶
Array of atomic numbers of atoms lying within molecule.
- transform(transformation: czone.transform.transform.BaseTransform, transform_origin=True)¶
Transform molecule with given transformation.
- Parameters
transformation (BaseTransform) – transformation to apply to molecule.
- update_positions(positions)¶
- update_species(species)¶
- class czone.molecule.molecule.Molecule(species, positions, **kwargs)¶
Bases:
czone.molecule.molecule.BaseMolecule
Standard object for representing molecules.