rdmc.conformer_generation.ts_generators#
Modules for TS conformer generation workflows.
- class rdmc.conformer_generation.ts_generators.TSConformerGenerator(rxn_smiles: str, multiplicity: int | None = None, use_smaller_multiplicity: bool = True, embedder: TSInitialGuesser | None = None, optimizer: TSOptimizer | None = None, pruner: ConfGenPruner | None = None, verifiers: TSVerifier | List[TSVerifier] | None = None, sampler: TorisonalSampler | None = None, final_modules: TSOptimizer | TSVerifier | List[TSVerifier] | None = None, save_dir: str | None = None)#
Bases:
object
The class used to define a workflow for generating a set of TS conformers.
- Parameters:
rxn_smiles (str) – The SMILES of the reaction. The SMILES should be formatted similar to
"reactant1.reactant2>>product1.product2."
.multiplicity (int, optional) – The spin multiplicity of the reaction. The spin multiplicity will be interpreted from the reaction smiles if this is not given by the user.
use_smaller_multiplicity (bool, optional) – Whether to use the smaller multiplicity when the interpreted multiplicity from the reaction smiles is inconsistent between reactants and products. Defaults to
True
.embedder (TSInitialGuesser, optional) – Instance of a
TSInitialGuesser
. Available options areTSEGNNGuesser
,TSGCNGuesser
,AutoNEBGuesser
,RMSDPPGuesser
, andDEGSMGuesser
.optimizer (TSOptimizer, optional) – Instance of a
TSOptimizer
. Available options areSellaOptimizer
,OrcaOptimizer
,GaussianOptimizer
, andQChemOptimizer
.pruner (ConfGenPruner, optional) – The pruner used to prune conformers based on geometric similarity after optimization. Instance of a
ConfGenPruner
. Available options areCRESTPruner
andTorsionPruner
.verifiers (TSVerifier or list of TSVerifiers, optional) – The verifier or a list of verifiers used to verify the obtained TS conformer. Instance of a
TSVerifier
. Available options areXTBFrequencyVerifier
,GaussianIRCVerifier
,OrcaIRCVerifier
,QChemIRCVerifier
, andTSScreener
.sampler (TorisonalSampler, optional) – The sampler used to do automated conformer search for the obtained TS conformer. You can use
TorsionalSampler
to define your own sampler.final_modules (TSOptimizer, TSVerifier or list of TSVerifiers, optional) – The final modules can include optimizer in different LoT than previous one and verifier(s) used to verify the obtained TS conformer.
save_dir (str or Pathlike object, optional) – The path to save the intermediate files and outputs generated during the generation. Defaults to
None
.
- embed_stable_species(smiles: str) RDKitMol #
Embed the reactant and product complex according to the SMILES provided.
- Parameters:
smiles (str) – The reactant or product complex in SMILES. if multiple molecules involve, use
"."
to separate them.- Returns:
RDKitMol – An RDKitMol of the reactant or product complex with 3D geometry embedded.
- generate_seed_mols(rxn_smiles: str, n_conformers: int = 20, shuffle: bool = False) list #
Genereate seeds of reactant/product pairs to be passed to the following steps.
- Parameters:
rxn_smiles (str) – The reaction smiles of the reaction.
n_conformers (int, optional) – The maximum number of conformers to be generated. Defaults to
20
.shuffle (bool, optional) – Whether or not to shuffle the embedded mols. Defaults to
False
.
- Returns:
list – A list of reactant/product pairs in
RDKitMol
.
- set_filter(ts_mol: RDKitMol, n_conformers: int) RDKitMol #
Assign the indices of reactions to track whether the conformers are passed to the following steps.
- Parameters:
ts_mol ('RDKitMol') – The TS in RDKitMol object with 3D geometries embedded.
n_conformers (int) – The maximum number of conformers to be passed to the following steps.
- Returns:
RDKitMol – with
KeepIDs
as a list ofTrue
andFalse
indicating whether a conformer passes the check.