aim2dat.strct.ext_manipulation
¶
External manipulation methods.
Submodules¶
Package Contents¶
Functions¶
|
Add a functional group or an atom to a host site. |
|
Add a functional group or an atom to a host site. |
|
Add structure at random position and orientation. |
-
aim2dat.strct.ext_manipulation.add_functional_group(structure: aim2dat.strct.strct.Structure, wrap: bool =
False
, host_index: int =0
, functional_group: str ='CH3'
, bond_length: float =1.25
, r_max: float =15.0
, cn_method: str ='minimum_distance'
, min_dist_delta: float =0.1
, n_nearest_neighbours: int =5
, econ_tolerance: float =0.5
, econ_conv_threshold: float =0.001
, voronoi_weight_type: float ='rel_solid_angle'
, voronoi_weight_threshold: float =0.5
, okeeffe_weight_threshold: float =0.5
, change_label: bool =False
) aim2dat.strct.strct.Structure [source]¶ Add a functional group or an atom to a host site.
Notes
This function is depreciated and will be removed soon. Please use
aim2dat.strct.ext_manipulation.add_structure
instead.- Parameters:¶
structure (aim2dat.strct.Structure) – Structure to which the guest structure is added.
wrap (bool (optional)) – Wrap atomic positions back into the unit cell.
host_index (int) – Index of the host site.
functional_group (str) – Functional group or element symbol of the added functional group or atom.
bond_length (float) – Bond length between the host atom and the base atom of the functional group.
r_max (float (optional)) – Cut-off value for the maximum distance between two atoms in angstrom.
cn_method (str (optional)) – Method used to calculate the coordination environment.
min_dist_delta (float (optional)) – Tolerance parameter that defines the relative distance from the nearest neighbour atom for the
'minimum_distance'
method.n_nearest_neighbours (int (optional)) – Number of neighbours that are considered coordinated for the
'n_neighbours'
method.econ_tolerance (float (optional)) – Tolerance parameter for the econ method.
econ_conv_threshold (float (optional)) – Convergence threshold for the econ method.
voronoi_weight_type (str (optional)) – Weight type of the Voronoi facets. Supported options are
'covalent_atomic_radius'
,'area'
and'solid_angle'
. The prefix'rel_'
specifies that the relative weights with respect to the maximum value of the polyhedron are calculated.voronoi_weight_threshold (float (optional)) – Weight threshold to consider a neighbouring atom coordinated.
change_label (bool (optional)) – Add suffix to the label of the new structure highlighting the performed manipulation.
- Returns:¶
aim2dat.strct.Structure – Structure with attached functional group.
-
aim2dat.strct.ext_manipulation.add_structure_coord(structure: aim2dat.strct.strct.Structure, wrap: bool =
False
, host_indices: int | list[int] =0
, guest_index: int =0
, guest_structure: aim2dat.strct.strct.Structure | str ='CH3'
, guest_dir: None | list[float] =None
, bond_length: float =1.25
, r_max: float =15.0
, cn_method: str ='minimum_distance'
, min_dist_delta: float =0.1
, n_nearest_neighbours: int =5
, radius_type: str ='chen_manz'
, atomic_radius_delta: float =0.0
, econ_tolerance: float =0.5
, econ_conv_threshold: float =0.001
, voronoi_weight_type: float ='rel_solid_angle'
, voronoi_weight_threshold: float =0.5
, okeeffe_weight_threshold: float =0.5
, dist_constraints=[]
, dist_threshold: float | None =0.8
, change_label: bool =False
) aim2dat.strct.strct.Structure ¶ Add a functional group or an atom to a host site.
- Parameters:¶
structure (aim2dat.strct.Structure) – Structure to which the guest structure is added.
wrap (bool (optional)) – Wrap atomic positions back into the unit cell.
host_indices (int or list (optional)) – Index or indices of the host site(s). In case several indices are given the center of the sites is defined as host site as reference point for the bond length.
guest_index (int (optional)) – Index of the guest site.
guest_structure (str or aim2dat.strct.Structure (optional)) – A representation of the guest structure given as a string of a functional group or molecule (viable options are
'CH3'
,'COOH'
,'H2O'
,'NH2'
,'NO2'
or'OH'
), aStructure
object (bond direction is assumed to be the[-1.0, 0.0, 0.0]
direction) or the element symbol to add one single atom.guest_dir (list of floats (optional)) – Defines the orientation of the guest molecule. If not defined, a vector of nearest neighbors is constructed based on the guest index.
bond_length (float) – Bond length between the host atom and the base atom of the functional group.
r_max (float (optional)) – Cut-off value for the maximum distance between two atoms in angstrom.
cn_method (str (optional)) – Method used to calculate the coordination environment.
min_dist_delta (float (optional)) – Tolerance parameter that defines the relative distance from the nearest neighbour atom for the
'minimum_distance'
method.n_nearest_neighbours (int (optional)) – Number of neighbours that are considered coordinated for the
'n_neighbours'
method.econ_tolerance (float (optional)) – Tolerance parameter for the econ method.
econ_conv_threshold (float (optional)) – Convergence threshold for the econ method.
voronoi_weight_type (str (optional)) – Weight type of the Voronoi facets. Supported options are
'covalent_atomic_radius'
,'area'
and'solid_angle'
. The prefix'rel_'
specifies that the relative weights with respect to the maximum value of the polyhedron are calculated.voronoi_weight_threshold (float (optional)) – Weight threshold to consider a neighbouring atom coordinated.
dist_constraints (list (optional)) – List of three-fold tuples containing the index of the site of the host structure, the index of the site of the guest structure and the target distance. The position of the guest structure is varied based on a grid search until the sum of the absolute errors in minimized.
dist_threshold (float or None (optional)) – Check the distances between all site pairs of the host and guest structure to ensure that none of the added atoms collide.
change_label (bool (optional)) – Add suffix to the label of the new structure highlighting the performed manipulation.
- Returns:¶
aim2dat.strct.Structure – Structure with attached functional group.
-
aim2dat.strct.ext_manipulation.add_structure_random(structure: aim2dat.strct.strct.Structure, wrap: bool =
False
, guest_structure: aim2dat.strct.strct.Structure | str ='CH3'
, dist_threshold: float | None =0.8
, random_state: float | None =None
, change_label: bool =False
)¶ Add structure at random position and orientation.
- Parameters:¶
structure (aim2dat.strct.Structure) – Structure to which the guest structure is added.
wrap (bool (optional)) – Wrap atomic positions back into the unit cell.
guest_structure (str or aim2dat.strct.Structure (optional)) – A representation of the guest structure given as a string of a functional group or molecule (viable options are
'CH3'
,'COOH'
,'H2O'
,'NH2'
,'NO2'
or'OH'
), aStructure
object (bond direction is assumed to be the[-1.0, 0.0, 0.0]
direction) or the element symbol to add one single atom.dist_threshold (float or None (optional)) – Check the distances between all site pairs of the host and guest structure to ensure that none of the added atoms collide.
random_state (float or None (optional)) – Specify the initial random state to ensure reproducible results.
change_label (bool (optional)) – Add suffix to the label of the new structure highlighting the performed manipulation.
- Raises:¶
ValueError – Could not add guest structure, host structure seems to be too aggregated.