+ + +
+
+ +
+
+ +
+ +
+ + +
+ +
+ + +
+
+ + + + + +
+ +
+

Classes#

+
+

Models: atomaton.models#

+
+
+class atomaton.models.Angle(center_atom, ordered_atoms)#
+

Bases: object

+
+ +
+
+class atomaton.models.Atoms(symbols=array([], dtype=float64), positions=array([], dtype=float64))#
+

Bases: object

+

Collection of Atoms, with methods for calculating bond, angle, dihedral, and improper terms, as well as other +important simulation parameters.

+

Based on (and uses some of) ASE atoms object. Reimplementing is for ease of control, and paedegogical exercise.

+
+
+classmethod bind_from_ase(ase_atoms)#
+
+ +
+
+classmethod bind_from_file(file)#
+
+ +
+
+calculate_angles()#
+
+ +
+
+calculate_bonds(cutoffs={'default': [0, 1.5]})#
+

Finds the bonds between atoms, as defined by the cutoffs dict.

+
+
Args:

cutoffs (dict, optional): Dictionary of bond cutoffs. Keys must match atom types, separated by a -, in alphabetically order. Defaults to {“default”: [0, 1.5]}.

+
+
Returns:

list(list(int, int)): list of bonds, by sorted atom index. +list(list[str, str)): list of bond types, sorted alphabetically by atom type. +list[list[int, int]]: list of bonds which cross the cell boundary, by sorted orignal atom index. +Atoms: list of atoms outside of the cell which are part of bonds crossing the cell. +list[list[int, int]]: list of bonds which cross the cell boundary, using the extended atoms index.

+
+
+
+ +
+
+calculate_dihedrals_and_impropers(improper_tol=0.1)#
+
+ +
+
+center_atom_in_cell()#
+
+ +
+
+create_extended_cell_minimal(max_bond_length=5.0)#
+

Creates a minimally extended cell to speed up O(N^2) bond check. This functions is O(N).

+
+
Args:

max_bond_length (float, optional): Maximum possible bond length, used to determine degree to which cell is extended. Defaults to 5.0.

+
+
Raises:

TypeError: max_bond_length must be a single value, or dictionary of bond cutoffs. +ValueError: max_bond_length must be less than half the length of the shortes unit cell dimension.

+
+
Returns:

ase.Atoms: minimally extended cell

+
+
+
+ +
+
+get_center_of_positions()#
+
+ +
+
+shift_atoms(shift)#
+
+ +
+
+view(**kwargs)#
+
+ +
+ +
+
+class atomaton.models.Crystal#
+

Bases: Atoms

+
+
+build_supercell(num_cells, filename=None)#
+
+ +
+ +
+
+class atomaton.models.Improper(center_atom, ordered_atoms)#
+

Bases: object

+
+ +
+
+class atomaton.models.SimulationBox#
+

Bases: object

+
+
+build_supercell()#
+
+ +
+
+classmethod create_from_atoms(atoms)#
+
+ +
+
+insert_atoms(atoms, position=None)#
+
+ +
+
+view()#
+
+ +
+ +
+
+class atomaton.models.UnitCell(cell_lengths, cell_angles, spacegroup='P1')#
+

Bases: object

+
+
+get_center_of_cell()#
+
+ +
+
+get_corners()#
+
+ +
+
+get_frac_to_cart_matrix()#
+
+ +
+ +
+
+ + +
+ + + + + + + +
+ + + + + + + +
+
+ +
+ +