LibBase API index¶
- class UnifiedChemicalSystem¶
A class representing a chemical system in the Amsterdam Modeling Suite
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: scm_libbase_internal.UnifiedChemicalSystem) -> None
Creates a new, empty ChemicalSystem.
__init__(self: scm_libbase_internal.UnifiedChemicalSystem, system_block: str) -> None
Creates a new ChemicalSystem from a System block string.
- __len__(self: UnifiedChemicalSystem) int ¶
- __str__(self: UnifiedChemicalSystem) str ¶
- add_all_atoms_to_region(self: UnifiedChemicalSystem, region: str) None ¶
Adds all of the system’s atoms to a region.
- add_atom(*args, **kwargs)¶
Overloaded function.
add_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) -> None
Adds a copy of an Atom to a ChemicalSystem.
add_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, coords: numpy.ndarray[numpy.float64[3, 1]], unit: str = ‘angstrom’) -> None
Adds a copy of an Atom to a ChemicalSystem.
add_atom(self: scm_libbase_internal.UnifiedChemicalSystem, Z: int, coords: numpy.ndarray[numpy.float64[3, 1]], unit: str = ‘angstrom’) -> None
Adds a new Atom of a given atomic number to the ChemicalSystem.
add_atom(self: scm_libbase_internal.UnifiedChemicalSystem, element: scm_libbase_internal.UnifiedElement, coords: numpy.ndarray[numpy.float64[3, 1]], unit: str = ‘angstrom’) -> None
Adds a new Atom of a given Element to the ChemicalSystem.
add_atom(self: scm_libbase_internal.UnifiedChemicalSystem, symbol: str, coords: numpy.ndarray[numpy.float64[3, 1]], unit: str = ‘angstrom’) -> None
Adds a new Atom to the ChemicalSystem given its symbol.
- add_atom_to_region(*args, **kwargs)¶
Overloaded function.
add_atom_to_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int, region: str) -> None
Adds an atom to a region.
add_atom_to_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, region: str) -> None
Adds an atom to a region.
- add_atoms_to_region(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]], region: str) None ¶
Adds multiple atoms to a region, given their atom indices.
- add_hydrogen_atoms(*args, **kwargs)¶
Overloaded function.
add_hydrogen_atoms(self: scm_libbase_internal.UnifiedChemicalSystem, atom_indices: List[int]) -> None
Add missing hydrogen atoms to organic compounds.
add_hydrogen_atoms(self: scm_libbase_internal.UnifiedChemicalSystem) -> None
Add missing hydrogen atoms to organic compounds.
- add_other(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem) None ¶
Merges another ChemicalSystem into this one.
- align_to(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem) None ¶
Translate and rotate the system to maximally align it with ‘other’.
- static all_from_input(input_file: scm_libbase_internal.InputFile) Dict[str, UnifiedChemicalSystem] ¶
Constructs and returns ChemicalSystems for all System (and LoadSystem) blocks in an InputFile.
- apply_strain(self: UnifiedChemicalSystem, strain_matrix: numpy.ndarray[numpy.float64[m, n]]) None ¶
Apply a strain deformation to a periodic system.
- apply_strain_voigt(self: UnifiedChemicalSystem, strain_voigt: List[float]) None ¶
Apply a strain deformation to a periodic system.
- atom_index(self: UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) int ¶
Given an Atom instance, returns its index in ChemicalSystem.atoms.
- atom_is_in_ring(*args, **kwargs)¶
Overloaded function.
atom_is_in_ring(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int) -> bool
Checks if an atom is part of any ring.
atom_is_in_ring(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) -> bool
Checks if an atom is part of any ring.
- atomic_properties_enabled(self: UnifiedChemicalSystem, group_prefix: str) bool ¶
Checks if a group of atomic properties is enabled or not.
- bond_cuts_molecule(*args, **kwargs)¶
Overloaded function.
bond_cuts_molecule(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, to_atom: int) -> bool
Checks if removing the bonds between two atoms would cut the graph into two disjoint subgraphs.
bond_cuts_molecule(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, to_atom: scm_libbase_internal.UnifiedAtom) -> bool
Checks if removing the bonds between two atoms would cut the graph into two disjoint subgraphs.
- bounding_box_volume(self: UnifiedChemicalSystem, unit: str = 'angstrom3') float ¶
Volume of the bounding box.
- center_of_mass(self: UnifiedChemicalSystem, unit: str = 'angstrom') numpy.ndarray[numpy.float64[3, 1]] ¶
Position of the center of mass.
- check_molecule_symmetry(self: UnifiedChemicalSystem, label: str, tolerance: float = 1e-07) bool ¶
Checks if a molecule has a particular symmetry given by a Schoenflies symbol.
- contains_atom(self: UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) bool ¶
Checks if an Atom instance is part of a ChemicalSystem.
- copy(self: UnifiedChemicalSystem) UnifiedChemicalSystem ¶
Creates a deep copy of the ChemicalSystem.
- density(self: UnifiedChemicalSystem, unit: str = 'dalton/angstrom3') float ¶
Returns the density of the system in the specified unit. Only valid for 3D periodic systems.
- deselect_all(self: UnifiedChemicalSystem) None ¶
Deselects all atoms, or in other words: clears the current selection.
- deselect_atom(*args, **kwargs)¶
Overloaded function.
deselect_atom(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: int) -> None
Selects an atom given its index.
deselect_atom(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: scm_libbase_internal.UnifiedAtom) -> None
Selects an instance of an atom.
- deselect_atoms(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]]) None ¶
Deselects multiple atoms at once, given their atom indices.
- deselect_atoms_if(self: UnifiedChemicalSystem, pred: Callable[[scm_libbase_internal.UnifiedAtom], bool]) None ¶
Deselects atoms based on a predicate function.
- determine_species(self: UnifiedChemicalSystem, comp: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom], bool]) Tuple[int, List[int], List[int]] ¶
Determines the present atomic species, based on a user defined comparator function.
- disable_atomic_properties(self: UnifiedChemicalSystem, group_prefix: str) None ¶
Disables the use of a group of atomic properties. Any set properties within the group will be discarded.
- do_regions_intersect(self: UnifiedChemicalSystem, regionA: str, regionB: str) bool ¶
Checks if two regions or region expressions intersect, i.e. have at least one atom in common.
- enable_atomic_properties(self: UnifiedChemicalSystem, group_prefix: str) None ¶
Enables the use of a group of atomic properties.
- extract_atoms(self: UnifiedChemicalSystem, atom_indices: List[int]) UnifiedChemicalSystem ¶
Returns a new system build from a subset of atoms.
- formula(self: UnifiedChemicalSystem) str ¶
Chemical formula in Hill notation, e.g. H2O or CH4.
- static from_in(filename: str, name: str = '') UnifiedChemicalSystem ¶
Constructs and returns a new ChemicalSystem from a (possibly named) System block in an AMS input file.
- static from_input(input_file: scm_libbase_internal.InputFile, prefix: str) UnifiedChemicalSystem ¶
Constructs and returns a new ChemicalSystem from an InputFile instance, given a prefix, e.g. ‘System[1]%’.
- static from_kf(*args, **kwargs)¶
Overloaded function.
from_kf(filename: str, section: str = ‘Molecule’) -> scm_libbase_internal.UnifiedChemicalSystem
Constructs and returns a new ChemicalSystem from a section on a KF file.
from_kf(kf: scm_libbase_internal.KFFile, section: str = ‘Molecule’) -> scm_libbase_internal.UnifiedChemicalSystem
Constructs and returns a new ChemicalSystem from a section on a KF file.
- static from_xyz(filename: str) UnifiedChemicalSystem ¶
Constructs and returns a new ChemicalSystem from an extended XYZ file.
- geometric_center(self: UnifiedChemicalSystem, unit: str = 'angstrom') numpy.ndarray[numpy.float64[3, 1]] ¶
Position of the geometric center.
- get_atoms_in_region(self: UnifiedChemicalSystem, region: str) numpy.ndarray[numpy.int32[m, 1]] ¶
Returns a sorted array of atom indices of all atoms in a region or region expression.
- get_atoms_outside_region(self: UnifiedChemicalSystem, region: str) numpy.ndarray[numpy.int32[m, 1]] ¶
Returns a sorted array of atom indices of all atoms outside of a region or region expression.
- get_distance(*args, **kwargs)¶
Overloaded function.
get_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, unit: str = ‘angstrom’) -> float
Measures the distance between two atoms.
get_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: scm_libbase_internal.UnifiedAtom, b: scm_libbase_internal.UnifiedAtom, unit: str = ‘angstrom’) -> float
Measures the distance between two atoms.
- get_fractional_coordinate(self: UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, unit: str = 'angstrom') numpy.ndarray[numpy.float64[3, 1]] ¶
Returns the fractional coordinate of a single atom with respect to the cell. In non-periodic directions the plain coordinates are returned in the specified unit.
- get_fractional_coordinates(self: UnifiedChemicalSystem, unit: str = 'angstrom') numpy.ndarray[numpy.float64[m, 3]] ¶
Returns the fractional coordinates of all atoms with respect to the cell. In non-periodic directions the plain coordinates are returned in the specified unit.
- static get_operands_in_region_expression(region_expression: str) List[str] ¶
Returns a sorted list of all unique operands used in a region expression.
- get_regions_of_atom(*args, **kwargs)¶
Overloaded function.
get_regions_of_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int) -> List[str]
Returns an alphabetically sorted list of the names of all regions an atom is part of.
get_regions_of_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) -> List[str]
Returns an alphabetically sorted list of the names of all regions an atom is part of.
- get_selected_atoms(self: UnifiedChemicalSystem) numpy.ndarray[numpy.int32[m, 1]] ¶
Returns an array of indices of all selected atoms.
- get_species(self: UnifiedChemicalSystem, comp: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom], bool]) List[List[int]] ¶
Determines the present atomic species, based on a user defined comparator function.
- guess_bonds(self: UnifiedChemicalSystem) None ¶
Guesses bonds based on the atomic elements and the geometry. Keeps existing bonds.
- has_bonds(self: UnifiedChemicalSystem) bool ¶
Checks if the system has any bonding information.
- has_ghost_atoms(self: UnifiedChemicalSystem) bool ¶
Checks whether the ChemicalSystem contains any Ghost atoms.
- has_lattice(self: UnifiedChemicalSystem) bool ¶
Checks if the system has a lattice.
- has_region(self: UnifiedChemicalSystem, region: str) bool ¶
Checks if a region exists in the system, given its region name.
- has_same_atoms(*args, **kwargs)¶
Overloaded function.
has_same_atoms(self: scm_libbase_internal.UnifiedChemicalSystem, other: scm_libbase_internal.UnifiedChemicalSystem, properties: List[str] = []) -> bool
Checks if two systems have identical atoms in the same order.
has_same_atoms(self: scm_libbase_internal.UnifiedChemicalSystem, other: scm_libbase_internal.UnifiedChemicalSystem, comp: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom], bool]) -> bool
Checks if two systems have identical atoms in the same order given a user defined comparator.
- has_same_coords(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem, tol: float = 0.001, unit: str = 'angstrom') bool ¶
Checks if the atomic coordinates of two systems are within a threshold of each other.
- has_same_geometry(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem, tol: float = 0.001, unit: str = 'angstrom') bool ¶
Checks if the atomic coordinates and lattice vectors of two systems are within a threshold of each other.
- has_same_regions(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem) bool ¶
Checks if two systems have identical regions, meaning region names and included atom indices.
- has_same_selection(self: UnifiedChemicalSystem, other: UnifiedChemicalSystem, consider_selection_order: bool = False) bool ¶
Checks if two systems have the same atom selection.
- inertia_tensor(self: UnifiedChemicalSystem) numpy.ndarray[numpy.float64[3, 3]] ¶
Returns the system’s inertia tensor as a 3x3 matrix (units amu*angstrom^2).
- invert_selection(self: UnifiedChemicalSystem) None ¶
Inverts the set of selected atoms.
- is_atom_in_region(*args, **kwargs)¶
Overloaded function.
is_atom_in_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int, region: str) -> bool
Checks if an atom is in a region or region expression.
is_atom_in_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, region: str) -> bool
Checks if an atom is in a region or region expression.
- is_atom_outside_region(*args, **kwargs)¶
Overloaded function.
is_atom_outside_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int, region: str) -> bool
Checks if an atom is outside of a region or region expression.
is_atom_outside_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, region: str) -> bool
Checks if an atom is outside of a region or region expression.
- is_atom_selected(*args, **kwargs)¶
Overloaded function.
is_atom_selected(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: int) -> bool
Checks if an atom is currently selected, given its index.
is_atom_selected(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: scm_libbase_internal.UnifiedAtom) -> None
Checks if an instance of an atom is currently selected.
- is_linear(self: UnifiedChemicalSystem) bool ¶
Checks is a ChemicalSystem is linear.
- static is_valid_region_name(name: str) bool ¶
Checks if a string is a valid region name.
- make_selection_cappable(self: UnifiedChemicalSystem) None ¶
Extends the current selection but does not cross single bonds, unless they are to hydrogen atoms.
- map_atoms(*args, **kwargs)¶
Overloaded function.
map_atoms(self: scm_libbase_internal.UnifiedChemicalSystem, start_range: float) -> Tuple[bool, numpy.ndarray[numpy.int32[m, 3]]]
Maps all atoms into a unit cell from [start_range:start_range+1] in fractional coordinates.
map_atoms(self: scm_libbase_internal.UnifiedChemicalSystem, start_range: numpy.ndarray[numpy.float64[m, 1]]) -> Tuple[bool, numpy.ndarray[numpy.int32[m, 3]]]
Maps all atoms into a unit cell from [start_range:start_range+1] in fractional coordinates.
- map_atoms_around_atom(*args, **kwargs)¶
Overloaded function.
map_atoms_around_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) -> Tuple[bool, numpy.ndarray[numpy.int32[m, 3]]]
Map all atoms around the chosen atom that will be in the center of the new unit cell.
map_atoms_around_atom(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int) -> Tuple[bool, numpy.ndarray[numpy.int32[m, 3]]]
Map all atoms around the chosen atom that will be in the center of the new unit cell.
- map_atoms_continuous(self: UnifiedChemicalSystem) bool ¶
Map all atoms that are bonded across the periodic boundary back.
- molecule_indices(self: UnifiedChemicalSystem) numpy.ndarray[numpy.int32[m, 1]] ¶
Returns a
num_atoms
sized array mapping the atoms to connected molecules of the system.
- molgraph_dijkstra(self: UnifiedChemicalSystem, from_atidx: int, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float], to_atidx: int = -1) Tuple[List[float], List[int], List[bool]] ¶
General method implementing the Dijkstra algorithm on the molecular graph.
- moments_of_inertia(self: UnifiedChemicalSystem) Tuple[numpy.ndarray[numpy.float64[3, 1]], numpy.ndarray[numpy.float64[3, 3]]] ¶
Calculates the system’s moments of inertia and the corresponding principal axes (units amu*angstrom^2).
- moving_atoms_for_angle_change(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) numpy.ndarray[numpy.int32[m, 1]] ¶
Determines which atoms will move when changing the angle between three atoms.
- moving_atoms_for_dihedral_change(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, d: int, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) numpy.ndarray[numpy.int32[m, 1]] ¶
Determines which atoms will move when changing the dihedral between four atoms.
- moving_atoms_for_distance_change(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.LighterPartMoves: 2>) numpy.ndarray[numpy.int32[m, 1]] ¶
Determines which atoms will move when changing the distance between two atoms.
- num_atoms_in_region(self: UnifiedChemicalSystem, region: str) int ¶
Returns the number of atoms in a region or region expression.
- num_atoms_outside_region(self: UnifiedChemicalSystem, region: str) int ¶
Returns the number of atoms outside of a region or region expression.
- num_molecules(self: UnifiedChemicalSystem) int ¶
Counts the number of connected molecules that are part of this system.
- num_selected_atoms(self: UnifiedChemicalSystem) int ¶
The number of currently selected atoms.
- perturb_coordinates(self: UnifiedChemicalSystem, noise_level: float, unit: str = 'angstrom') None ¶
Perturb the atomic coordinates by adding random numbers between to each Cartesian component.
- perturb_lattice(self: UnifiedChemicalSystem, noise_level: float) None ¶
Perturb the lattice vectors by applying a random strain.
- remove_all_regions(self: UnifiedChemicalSystem) None ¶
Removes all regions. All atoms will keep existing, but will not longer be part of any region.
- remove_atom(self: UnifiedChemicalSystem, atom_index: int) None ¶
Removes a single atom from the system, given its index.
- remove_atom_from_all_regions(*args, **kwargs)¶
Overloaded function.
remove_atom_from_all_regions(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int) -> None
Removes an atom from all regions.
remove_atom_from_all_regions(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom) -> None
Removes an atom from all regions.
- remove_atom_from_region(*args, **kwargs)¶
Overloaded function.
remove_atom_from_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: int, region: str) -> None
Removes an atom from a region.
remove_atom_from_region(self: scm_libbase_internal.UnifiedChemicalSystem, atom: scm_libbase_internal.UnifiedAtom, region: str) -> None
Removes an atom from a region.
- remove_atoms(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]]) None ¶
Removes multiple atoms from the system, given their atom indices.
- remove_atoms_from_region(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]], region: str) None ¶
Adds multiple atoms to a region, given their atom indices.
- remove_region(self: UnifiedChemicalSystem, region: str) None ¶
Removes a region. Atoms in that region will keep existing, but will not longer be part of that region.
- reorder_atoms(self: UnifiedChemicalSystem, atom_order: List[int]) None ¶
Reorders the system’s atoms given a list of atom indices in the desired order.
- static rmsd(a: UnifiedChemicalSystem, b: UnifiedChemicalSystem, align: bool, unit: str = 'angstrom') float ¶
Computes the RMSD between two systems. ‘align’: whether or not the systems should be roto-translated as to maximize the RMSD.
- rotate(self: UnifiedChemicalSystem, rot_mat: numpy.ndarray[numpy.float64[3, 3]]) None ¶
Rotate the system according to the rotation matrix.
- rotation_axis_for_angle_change(self: UnifiedChemicalSystem, arg0: int, arg1: int, arg2: int) numpy.ndarray[numpy.float64[3, 1]] ¶
Determines the rotation axis for changing the angle between three atoms.
- static rotation_matrix_minimizing_rmsd(a: UnifiedChemicalSystem, b: UnifiedChemicalSystem) numpy.ndarray[numpy.float64[3, 3]] ¶
Given two chemical systems, returns the rotation matrix that minimizes the RMSD.
- select_all(self: UnifiedChemicalSystem) None ¶
Selects all atoms.
- select_atom(*args, **kwargs)¶
Overloaded function.
select_atom(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: int) -> None
Selects an atom given its index.
select_atom(self: scm_libbase_internal.UnifiedChemicalSystem, arg0: scm_libbase_internal.UnifiedAtom) -> None
Selects an instance of an atom.
- select_atom_close_to_origin(self: UnifiedChemicalSystem) None ¶
Selects the atom that is closest to the origin of the coordinate system.
- select_atoms(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]]) None ¶
Selects multiple atoms at once, given their atom indices.
- select_atoms_if(self: UnifiedChemicalSystem, pred: Callable[[scm_libbase_internal.UnifiedAtom], bool]) None ¶
Selects atoms based on a predicate function.
- select_atoms_of_same_type(self: UnifiedChemicalSystem) None ¶
Selects all atoms whose element is the same as of a currently selected atom.
- select_connected(self: UnifiedChemicalSystem) None ¶
Selects all atoms bonded to the currently selected atoms.
- select_connected_if(self: UnifiedChemicalSystem, pred: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedBond], bool]) None ¶
Selects atoms bonded to the currently selected atoms based on a predicate function.
- select_molecule(self: UnifiedChemicalSystem) None ¶
Using the bonds, selects entire molecules that include any currently selected atom.
- select_molecule_if(self: UnifiedChemicalSystem, pred: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedBond], bool]) None ¶
Using the bonds and a predicate function, selects all molecules that include a currently selected atom.
- select_region(self: UnifiedChemicalSystem, region: str) None ¶
Selects atoms in a region or region expression.
- select_within_radius(self: UnifiedChemicalSystem, radius: float, unit: str = 'angstrom') None ¶
Selects all atoms within a given radius of any of the currently selected atoms.
- set_angle(*args, **kwargs)¶
Overloaded function.
set_angle(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, angle: float, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) -> None
Sets the angle between three atoms by moving atoms according to a policy.
set_angle(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, angle: float, unit: str, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) -> None
Sets the angle between three atoms by moving atoms according to a policy.
set_angle(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, angle: float, rotation_axis: numpy.ndarray[numpy.float64[3, 1]], moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the angle between three atoms by moving a specified set of atoms.
set_angle(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, angle: float, unit: str, rotation_axis: numpy.ndarray[numpy.float64[3, 1]], moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the angle between three atoms by moving a specified set of atoms.
- set_atom(self: UnifiedChemicalSystem, atom_index: int, atom: scm_libbase_internal.UnifiedAtom) None ¶
Safe assignment of an Atom instance to atoms[atom_index].
- set_atoms_in_region(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]], region: str) None ¶
Creates or sets an entire region given the indices of the atoms to be part of the region.
- set_density(self: UnifiedChemicalSystem, target_density: float, unit: str = 'dalton/angstrom3') None ¶
Applies a uniform strain to match the specified target density. Only valid for 3D periodic systems.
- set_dihedral(*args, **kwargs)¶
Overloaded function.
set_dihedral(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, d: int, angle: float, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) -> None
Sets the dihedral between four atoms by moving atoms according to a policy.
set_dihedral(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, d: int, angle: float, unit: str, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.SecondPartMoves: 1>) -> None
Sets the dihedral between four atoms by moving atoms according to a policy.
set_dihedral(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, d: int, angle: float, moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the dihedral between four atoms by moving a specified set of atoms.
set_dihedral(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, c: int, d: int, angle: float, unit: str, moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the dihedral between four atoms by moving a specified set of atoms.
- set_distance(*args, **kwargs)¶
Overloaded function.
set_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, dist: float, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.LighterPartMoves: 2>) -> None
Sets the distance between two atoms by moving atoms according to a policy.
set_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, dist: float, unit: str, policy: scm_libbase_internal.UnifiedChemicalSystem.InternalCoordinateManipulationPolicy = <InternalCoordinateManipulationPolicy.LighterPartMoves: 2>) -> None
Sets the distance between two atoms by moving atoms according to a policy.
set_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, dist: float, moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the distance between two atoms by moving a specified set of atoms.
set_distance(self: scm_libbase_internal.UnifiedChemicalSystem, a: int, b: int, dist: float, unit: str, moving_atoms: numpy.ndarray[numpy.int32[m, 1]]) -> None
Sets the distance between two atoms by moving a specified set of atoms.
- set_fractional_coordinates(self: UnifiedChemicalSystem, frac_coords: numpy.ndarray[numpy.float64[m, 3]], unit: str = 'angstrom') None ¶
Sets the fractional coordinates of all atoms. In non-periodic directions the plain coordinates should be passed in the specified unit.
- set_lattice_displacements_from_minimum_image_convention(self: UnifiedChemicalSystem) None ¶
Applies the minimum image convention which sets the lattice_displacements for all bonds to be the shortest possible.
- set_num_lattice_vectors(self: UnifiedChemicalSystem, nvec: int) None ¶
Sets the number of lattice vectors.
- set_selected_atoms(self: UnifiedChemicalSystem, atom_indices: numpy.ndarray[numpy.int32[m, 1]]) None ¶
Sets the selection to the given atom indices. Any previous selection is cleared.
- shortest_path_between(*args, **kwargs)¶
Overloaded function.
shortest_path_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, to_atom: int, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> Optional[List[int]]
Returns the shortest path between two atoms (using a custom distance function).
shortest_path_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, to_atom: int) -> Optional[List[int]]
Returns the shortest path between two atoms (measured in number of hops).
shortest_path_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, to_atom: scm_libbase_internal.UnifiedAtom, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> Optional[List[int]]
Returns the shortest path between two atoms (using a custom distance function).
shortest_path_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, to_atom: scm_libbase_internal.UnifiedAtom) -> Optional[List[int]]
Returns the shortest path between two atoms (measured in number of hops).
- shortest_path_length_between(*args, **kwargs)¶
Overloaded function.
shortest_path_length_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, to_atom: int, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> float
Returns the lengths of the shortest path between two atoms (measured using a custom distance function).
shortest_path_length_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, to_atom: int) -> float
Returns the length of the shortest path between two atoms (measured in number of hops).
shortest_path_length_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, to_atom: scm_libbase_internal.UnifiedAtom, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> float
Returns the lengths of the shortest path between two atoms (measured using a custom distance function).
shortest_path_length_between(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, to_atom: scm_libbase_internal.UnifiedAtom) -> float
Returns the length of the shortest path between two atoms (measured in number of hops).
- shortest_path_lengths_from(*args, **kwargs)¶
Overloaded function.
shortest_path_lengths_from(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> List[float]
Returns the lengths of all shortest paths from a source atom using a custom distance function.
shortest_path_lengths_from(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: int) -> List[float]
Returns the lengths (in number of hops) of all shortest paths from a source atom.
shortest_path_lengths_from(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom, dist_func: Callable[[int, int, scm_libbase_internal.UnifiedBond], float]) -> List[float]
Returns the lengths of all shortest paths from a source atom using a custom distance function.
shortest_path_lengths_from(self: scm_libbase_internal.UnifiedChemicalSystem, from_atom: scm_libbase_internal.UnifiedAtom) -> List[float]
Returns the lengths (in number of hops) of all shortest paths from a source atom.
- slice_layers(self: UnifiedChemicalSystem, ref_atom: int, num_layers: int, miller: numpy.ndarray[numpy.int32[3, 1]], translate: float = 0.0, unit: str = 'angstrom') None ¶
Slice a 3D cell to create a 2D slab by specifying the amount of layers in the resulting slab.
- slice_thickness(self: UnifiedChemicalSystem, ref_atom: int, top: float, bottom: float, miller: numpy.ndarray[numpy.int32[3, 1]], translate: float = 0.0, unit: str = 'angstrom') None ¶
Slice a 3D cell to create a 2D slab by specifying the upper and lower bound of the resulting slab.
- sort_atoms(self: UnifiedChemicalSystem, comp: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom], bool]) None ¶
Sorts the system’s atoms according to a user defined comparator function.
- sorted_atom_order(self: UnifiedChemicalSystem, comp: Callable[[scm_libbase_internal.UnifiedAtom, scm_libbase_internal.UnifiedAtom], bool]) List[int] ¶
Returns the atom order based on a user defined comparator function as a list of atom indices.
- split(self: UnifiedChemicalSystem, part_indices: numpy.ndarray[numpy.int32[m, 1]]) List[UnifiedChemicalSystem] ¶
Splits the system into parts and returns a list of these parts as separate systems.
- split_into_molecules(self: UnifiedChemicalSystem) List[UnifiedChemicalSystem] ¶
Splits the system into individual molecules based on the connectivity between atoms.
- supercell(self: UnifiedChemicalSystem, supercell: numpy.ndarray[numpy.int32[m, 1]]) None ¶
Create a supercell by scaling the lattice vectors.
- supercell_trafo(self: UnifiedChemicalSystem, supercell: numpy.ndarray[numpy.int32[m, n]]) None ¶
Create a supercell by creating the matrix product of the lattice vectors and the supercell.
- symmetrize(self: UnifiedChemicalSystem) str ¶
Symmetrizes a system, using either
symmetrize_molecule
orsymmetrize_cell
, depending on periodicity.
- symmetrize_cell(self: UnifiedChemicalSystem, precision: float = 0.1) Tuple[int, str, str] ¶
Symmetrize a 3D cell and return the symmetry symbols (number, international symbol, schoenflies symbol).
- symmetrize_molecule(self: UnifiedChemicalSystem, tolerance: float = 0.05) str ¶
Symmetrizes and reorients a molecule.
- to_conventional_cell(self: UnifiedChemicalSystem, precision: float = 0.1) None ¶
Convert a 2D or 3D cell to its conventional representation.
- to_primitive_cell(self: UnifiedChemicalSystem, precision: float = 0.1) None ¶
Convert a 2D or 3D cell to its primitive representation.
- total_mass(self: UnifiedChemicalSystem) float ¶
Total mass in atomic mass units (dalton).
- translate(self: UnifiedChemicalSystem, shift: numpy.ndarray[numpy.float64[3, 1]], unit: str = 'angstrom') None ¶
Translates all atoms in the ChemicalSystem by a vector.
- write_in(self: UnifiedChemicalSystem, filename: str) None ¶
Writes a ChemicalSystem to file as an AMS System block.
- write_kf(*args, **kwargs)¶
Overloaded function.
write_kf(self: scm_libbase_internal.UnifiedChemicalSystem, filename: str, section: str = ‘Molecule’, omode: scm_libbase_internal.KFFile.OpenMode = <OpenMode.Any: 0>) -> None
Writes a ChemicalSystem to a section on a KF file.
write_kf(self: scm_libbase_internal.UnifiedChemicalSystem, kf: scm_libbase_internal.KFFile, section: str = ‘Molecule’) -> None
Writes a ChemicalSystem to a section on a KF file.
- write_xyz(self: UnifiedChemicalSystem, filename: str, extended_xyz_format: bool = True) None ¶
Writes a ChemicalSystem to an extended XYZ file.
- property adfprops¶
An optional list of all ADFProperties for all atoms.
- property atoms¶
A list of all Atom instances that are part of this ChemicalSystem.
- property bandprops¶
An optional list of all BANDProperties for all atoms.
- property bonds¶
The bonds of the system.
- property charge¶
The total charge of the system in in atomic units.
- property coords: AngstromCoordsArray¶
The coordinates of the atoms in Angstrom
- property dftbprops¶
An optional list of all DFTBProperties for all atoms.
- property electrostatic_embedding¶
The electrostatic embedding of the system.
- property forcefieldprops¶
An optional list of all ForcefieldProperties for all atoms.
- property guiprops¶
An optional list of all GUIProperties for all atoms.
- property lattice¶
The lattice of the system.
- property num_atoms¶
The number of Atoms in the ChemicalSystem.
- property num_regions¶
Returns the number of regions used in the system.
- property qeprops¶
An optional list of all QEProperties for all atoms.
- property reaxffprops¶
An optional list of all ReaxFFProperties for all atoms.
- property region_names¶
Returns a list of the names of all regions in the system.
- class InternalCoordinateManipulationPolicy¶
Members:
FirstPartMoves
SecondPartMoves
LighterPartMoves
HeavierPartMoves
- __init__(self: InternalCoordinateManipulationPolicy, value: int) None ¶
- property name¶
- class UnifiedElement¶
- property Z¶
The atomic number of the element.
- property bond_guess_connectors¶
Number of connectors of an atom as used by the AMS bond guessing algorithm.
- property bond_guess_electro_negative¶
Whether or not an element is considered electronegative by the AMS bond guessing algorithm.
- property bond_guess_metallic¶
Whether or not an element is considered metallic by the AMS bond guessing algorithm.
- property color¶
The color of the element used in the AMS graphical user interface.
- property lone_pairs¶
The element’s number of lone pairs as used by the AMS bond guessing algorithm.
- property mass¶
The atomic mass (in Dalton) of the most abundant naturally occurring isotope of the element.
- property radius¶
The covalent radius of the element in angstrom.
- property symbol¶
The symbol of the element, e.g
C
for carbon.
- class UnifiedElements¶
- static from_atomic_number(Z: int) UnifiedElement ¶
Returns an Element given its atomic number.
- static from_symbol(symbol: str) UnifiedElement ¶
Returns an Element given the element symbol as a string.