Function qsym2::bindings::python::molecule_symmetrisation::symmetrise_molecule
source · pub fn symmetrise_molecule(
py: Python<'_>,
inp_xyz: Option<PathBuf>,
inp_mol: Option<PyMolecule>,
out_target_sym: Option<PathBuf>,
loose_moi_threshold: f64,
loose_distance_threshold: f64,
target_moi_threshold: f64,
target_distance_threshold: f64,
use_magnetic_group: bool,
reorientate_molecule: bool,
max_iterations: usize,
consistent_target_symmetry_iterations: usize,
verbose: u8,
infinite_order_to_finite: Option<u32>,
) -> PyResult<PyMolecule>
Expand description
Python-exposed function to perform molecule symmetrisation by bootstrapping and log the result
via the qsym2-output
logger at the INFO
level.
See crate::drivers::molecule_symmetrisation_bootstrap
for more information.
§Arguments
inp_xyz
- An optional string providing the path to an XYZ file containing the molecule to be symmetrised. Only one ofinp_xyz
orinp_mol
can be specified. Python type:Optional[str]
.inp_mol
- An optionalPyMolecule
structure containing the molecule to be symmetrised. Only one ofinp_xyz
orinp_mol
can be specified. Python type:PyMolecule
.out_target_sym
- An optional path for aQSym2FileType::Sym
file to be saved that contains the symmetry-group detection results of the symmetrised molecule at the target thresholds. Python type:Optional[str]
.loose_moi_threshold
- The loose MoI threshold. Python type:float
.loose_distance_threshold
- The loose distance threshold. Python type:float
.target_moi_threshold
- The target (tight) MoI threshold. Python type:float
.target_distance_threshold
- The target (tight) distance threshold. Python type:float
.use_magnetic_group
- A boolean indicating if the magnetic group (i.e. the group including time-reversed operations) is to be used for the symmetrisation. Python type:bool
.reorientate_molecule
- A boolean indicating if the molecule is also reoriented to align its principal axes with the Cartesian axes. Python type:bool
.max_iterations
- The maximum number of iterations for the symmetrisation process. Python type:int
.consistent_target_symmetry_iterations
- The number of consecutive iterations during which the symmetry group at the target level of threshold must be consistently found for convergence to be reached, if this group cannot become identical to the symmetry group at the loose level of threshold. Python type:int
.verbose
- The print-out level. Python type:int
.infinite_order_to_finite
- The finite order with which infinite-order generators are to be interpreted to form a finite subgroup of the prevailing infinite group. This finite subgroup will be used for the symmetrisation. Python type:Optional[int]
.
§Returns
The symmetrised molecule.
Python type: PyMolecule
§Errors
Errors if any intermediate step in the symmetrisation procedure fails.