xiaoruiDong / RDMC

Reaction Data and Molecular Conformers (RDMC) is a package dealing with reactions, molecules, conformers, majorly in 3D.
https://xiaoruidong.github.io/RDMC/
MIT License
23 stars 1 forks source link

Integrate ACS in this package #39

Closed shihchengli closed 1 year ago

shihchengli commented 1 year ago

Description

This PR enables RDMC to run Automated Conformer Search (ACS) method. The source code of ACS is at https://github.com/oscarwumit/ACS. Currently, only methods supported in the Spharrow and xtb-python packages can be used. The Spharrow can be installed via pip install scine-sparrow.

Example

sampler = TorsionalSampler(
    method=args.opt_method,
    nprocs=args.nprocs,
    memory=args.memory,
    n_point_each_torsion=args.n_point_each_torsion,
    n_dimension=args.n_dimension,
    optimizer=optimizer,
    pruner=pruner,
    verifiers=verifiers,
    )

ts_gen = TSConformerGenerator(
    rxn_smiles=rxn_smiles,
    embedder=embedder,
    optimizer=optimizer,
    pruner=pruner,
    verifiers=verifiers,
    sampler=sampler,
    save_dir=save_dir,
)

_ = ts_gen(args.n_ts_conformers, args.n_ts_verifies, args.n_sampling, args.n_ts_refines)

where args.n_point_each_torsion is the number of points to be sampled along each rotational mode (Defaults to 45), args.n_dimension is the number of dimensions to be considered (Defaults to 2), and args.n_sampling is the maximum number of conformers to be passed to the torsional sampling (Defaults to 1).