Open source implementation of multiple minimum Monte Carlo
Project description
Multiple Minimum Monte Carlo
This package will help you perform a multiple minumum Monte Carlo conformer search as described in Chang et al., 1989. It is built to be used with an ASE calculator and ASE optimization tools but user-defined optimization strategies can be employed as well.
Installation
This package can be installed with pip
pip install multiple-minimum-monte-carlo
Tutorial
To run a search, you need to initialize Conformer, Calculation, and ConformerEnsemble objects. Conformer objects require either an input xyz or SMILES string. The default Calculation object is ASEOptimization which requires an ASE optimization routine (like FIRE) and an ASE calculator (the example below uses the aimnet calculator which will need to be installed separately from this package). ConformerEnsemble objects require a Conformer and Calculation object.
from ase.optimize.fire import FIRE
from ase.io import write
from aimnet.calculators import AIMNet2ASE
from multiple_minimum_monte_carlo.conformer import Conformer
from multiple_minimum_monte_carlo.calculation import ASEOptimization
from multiple_minimum_monte_carlo.conformer_ensemble import ConformerEnsemble
smiles = "CC(=O)Oc1ccccc1C(=O)O"
conformer = Conformer(smiles=smiles)
optimizer = ASEOptimization(calc=AIMNet2ASE(), optimizer=FIRE)
conformer_ensemble = ConformerEnsemble(conformer=conformer, calc=optimizer)
To run the search, call run_monte_carlo with the ConformerEnsemble object
final_ensemble = conformer_ensemble.run_monte_carlo()
final_ensemble will be a list of coordinate arrays that arranged by their energy (lowest energy first). To read out the minimum energy compound, do this
from ase.io import write
conformer.atoms.set_positions(final_ensemble[0])
write("lowest_energy_conformer.xyz", conformer.atoms, format="xyz")
User-Defined Calculation
To define a Calculation object, a class will need three function: init, run, and energy. init initializes the class with whatever information is necessary. run performs an optimization. It takes an ase.Atoms object and a list of atoms to constrain and returns an np array of cartesian coordinates (in angstroms) and a float with the energy of the conformation (in kcal/mol). energy calculates the energy of a conformer. It takes an ase.Atoms object and returns a float the with energy (in kcal/mol)
Planned future work
Include support for batched optimization (parallel calculations currently supported)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multiple_minimum_monte_carlo-0.0.6.tar.gz.
File metadata
- Download URL: multiple_minimum_monte_carlo-0.0.6.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ea9a45af63d5d9e4efef7a33117214326760ff9bd8b1a6be6e188e43465711
|
|
| MD5 |
9656e8a8cf723c19687add4351a8b0ec
|
|
| BLAKE2b-256 |
5bd5b3e40f91300d5cc1d82749c130b6bbfcecc66f75bb9b400d4a60b73a3baf
|
File details
Details for the file multiple_minimum_monte_carlo-0.0.6-py3-none-any.whl.
File metadata
- Download URL: multiple_minimum_monte_carlo-0.0.6-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc3152bf2f253fb0bb0a1e83b7d7d3f3f937ea94829f4709e67e0a23b5ea824a
|
|
| MD5 |
8620d029e5285b120412b2c7c2266ac8
|
|
| BLAKE2b-256 |
11523a123739e73ce1021d7539d4c0a5e601f714b42ef1e52691e48fe9ce2e75
|