pychemia.analysis package¶
The classes and methods of this package, take one or several structures and based only on geometrical properties, computes fingerprints, modify structures, match atoms from two structures, split and create surfaces. The functionality provided by this package is critical for many of the operations done by global search methods applied for structural search.
Submodules¶
pychemia.analysis.analysis module¶
-
class
pychemia.analysis.analysis.
StructureAnalysis
(structure, supercell=(1, 1, 1), radius=50)[source]¶ Bases:
object
The set of analysis provided by this class uses only structural information of one single structure. The kind of analysis includes coordination numbers, bonds, distances, hardness, fingerprints. Most of those analysis rely on a robust computation of inter-atomic distances. This class uses lazy evaluation for the distances and bonds to lower cpu and memory footprint.
-
close_distances
()[source]¶ Computes the closest distances for all the atoms
Returns: (tuple) Return a bond’s dictionary and distance’s list
-
distances
¶
-
get_bonds
(radius, noupdate=False, verbose=False, tolerance=0.05)[source]¶ Calculates bond lengths between all atoms within “radius”.
Parameters: - radius – (float) The radius of the sphere were the bonds will be computed
- noupdate – (bool) If the original radius should be increased until a connected structure is obtained
- verbose – (bool) Print some info about the number of bonds computed
- tolerance – (float) Tolerance for creation of a bond
:rtype : dict The values of the bonds are stored in self.info[‘bonds’]
-
get_bonds_coordination
(initial_cutoff_radius=0.8, ensure_conectivity=False, use_laplacian=True, verbose=False, tol=1e-15, jump=0.01, use_jump=True)[source]¶ Computes simultaneously the bonds for all atoms and the coordination number using a multiplicative tolerance for the sum of covalent radius
Parameters: - use_jump –
- jump –
- tol –
- verbose –
- use_laplacian –
- initial_cutoff_radius – (float) Tolerance factor (default is 1.2)
- ensure_conectivity – (bool) If True the tolerance of each bond is adjusted to ensure that each atom is connected at least once
Returns: tuple
-
hardness
(verbose=True, initial_cutoff_radius=0.8, ensure_conectivity=False, use_laplacian=True, use_jump=True, tol=1e-15)[source]¶ Calculates the hardness of a structure based in the model of XX We use the covalent radii from pychemia.utils.periodic. If noupdate=False the Laplacian matrix method is not used and rcut is 2*max(cov_radii)
Parameters: - use_jump –
- ensure_conectivity –
- verbose – (bool) To print some debug info
- initial_cutoff_radius – (float)
- use_laplacian – (bool) If True, the Laplacian method is used
- tol – (float) Tolerance for considering two atoms bonded
:rtype : (float)
-
hardness_old
(noupdate=False, verbose=False, tolerance=0.05)[source]¶ Calculates the hardness of a structure based in the model of XX We use the covalent radii from pychemia.utils.periodic. If noupdate=False the Laplacian matrix method is not used and rcut is 2*max(cov_radii)
Parameters: - noupdate – (bool) If True, the Laplacian method is used
- verbose – (bool) To print some debug info
- tolerance – (float)
:rtype : (float)
-
radius
¶
-
pychemia.analysis.changer module¶
pychemia.analysis.cluster module¶
-
class
pychemia.analysis.cluster.
ClusterAnalysis
(structure)[source]¶ Bases:
object
pychemia.analysis.matching module¶
pychemia.analysis.splitting module¶
-
pychemia.analysis.splitting.
do_mixing
(structure1, structure2, cut_planes1, cut_planes2, matching, match_index)[source]¶
-
pychemia.analysis.splitting.
get_cut_planes
(structure, delta_distance=0.1)[source]¶ Compute all the possible cutting planes defined on reduced coordinates for which the structure can be efectively cut considering that the perpendicular distance between two atoms is larger than ‘delta_distance’
Parameters: - structure –
- delta_distance –
Returns:
pychemia.analysis.surface module¶
-
pychemia.analysis.surface.
find_new_seed
(st, surface, seed, natom_crystal)[source]¶ Find a new atom to serve as seed for deposition
Parameters: - st – Structure
- surface – Indices of atoms on surface
- seed – Current seed
- natom_crystal – Number of atoms in crystal, cluster atoms are always at the end
Returns:
-
pychemia.analysis.surface.
get_onion_layers
(structure)[source]¶ Returns the different layers of a finite structure
Parameters: structure – Returns:
-
pychemia.analysis.surface.
get_surface_atoms
(structure)[source]¶ Returns the list of atoms that belong to the surface of a given structure The surface atoms are computed as those atom for which the Voronoi tesselation is open, ie, their voronoi volume associated is infinite.
Parameters: structure – PyChemia Structure (Non-periodic in the current implementation) Returns: (list) List of integers with the indices of the surface atoms