Skip to main content

python module for mechanochemical simulations

Project description

OpenMechanochem

Introduction

OpenMechanochemistry includes functions that can be used to simulate mechanochemical phenomena via the addition of external forces. This is designed to be used with the Atomic Simulation Environment (ASE). Together with ASE, this module can be combined with various quantum mechanical calculators for geometry optimizations and nudged elastic band calculations to sample the effect of mechanical forces to the potential energy hypersurface. Currently, this module can execute:

  • Force Modified Potential Energy Surface (FMPES) :
    J. Am. Chem. Soc., 131, 18, 6377–6379 (2009)
  • External Force Explicitly Included (EFEI) :
    Angew. Chem. Int. Ed., 48, 4190 (2009)
    J. Am. Chem. Soc.132, 10609-10614 (2010)
  • Enforced Geometry Optimization (EGO) :
    Molecular Physics,Vol 107, 22, (2009)
    Molecular Physics, 1098, 14 (2010)
    Disclaimer: The author of this repository is not affiliated to the proponents of formalism above. Code development and testing was done independently

Additionally, this module can also be used to add a finite wall potential in single direction. Current implementations includes four different types of potential, (1) linear, (2) inverse, and (3) lennard-jones potential.

Citations

Citation can be done as

De Chavez, D., Mechanochem, (2021), GitHub repository, 
	https://github.com/danjodc/OpenMechanochem

or similarly depending on your citation style. For LaTex users, the BibTex library can be appended with

@misc{DeChavez2021,
  author = {De Chavez, Danjo.},
  title = {OpenMechanochem},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/danjodc/mechanochem}},
}

Usage and Tutorial

LinearPull Class

In this tutorial, we will use FMPES and EFEI formalism to pull hydrogen molecule along the bond coordinate.

The mechanochem classes LinearPull and WallPot inherit from the ASE atoms object and hence an Atoms instance is required.
For an instance named mol, this can easily be done as

import mechanochem as mc

pull = mc.LinearPull(mol)

At this point, user should provide specific keyword arguments for the LinearPull object which would depend on the method key. As stated earlier the Mechanochem classes inherits from Atoms object and accepts similar parameters such as calculator, pbc, etc.

FMPES

Using FMPES, the required parameters are pulling points, applied points and applied forces This can be done by using the keywords pp, ap, and pullforce respectively.

  pull.set_params(method='FMPES', pp=PullPoints, ap=AppPoints, pullforce = force)

In FMPES, the relative cartesian coordinates of pulling points and applied points are of utmost importance. For example, a system described below where H0 and H1 are hydrogen atoms pulled towards points A and B respectively,

      A <---  0 ------- 1  --->   B

with H2 xyz given as

--> hydrogen.xyz
2
Hydrogen
 H                 0.000  0.000  0.000  
 H                 0.000  0.000  1.000

The pulling points and applied points could be given as

PullPoints = [[0.000,  0.000, -1.000],
              [0.000,  0.000,  2.000]]

AppPoints  = [0,1]

Care should be given that the position in pp and ap list corresponds with each other.
That is, the first list in pp list is the direction where atom with index as the first element of ap list is pulled to.

The magnitude of the applied force can be controlled using the pullforce key. Note that the force provided should be in atomic units and the pullforce is divided in the two force vectors equally.

EFEI

In comparison to FMPES, the EFEI pulls along the internal molecular coordinates. Using this method, the pulling coordinate can be defined using only the applied points and pullforce.

  pull.set_params(method='EFEI', ap=AppPoints, pullforce = force)
	     H0 <-------> H1  

The ap list is same as the case above, which is

AppPoints  = [0,1]

Using EFEI formalism, the pull force is divided equally to the two atoms given by the ap list.

After parameterization of the LinearPull class, geometry optimization or molecular dynamics can be done.
In the case of optimization, an example is given below.

pull.set_calculator(EMT())
dyn = BFGS(pull, trajectory='optimization.traj')
dyn.run(fmax=0.05)

Molecular dynamics can be done similarly. Users are suggested to visit ASE documentations for descriptions of parameters needed for MD and optimizations.

WallPotential Class

Similar to LinearPull class, the wallpot inherits from the atoms class. Hence, a prior instance of atoms should be provided.

mol = mc.WallPotential(slab)

The WallPotential class takes the parameters method, plane, height, and wallforce.

mol.set_params(method='linear', plane=atomplane , height=10, wallforce=force)

Method defines the type of interacting potential with the wall. The plane is a list of len(3) which defines the equation of the plane. The imaginary plane can then be displaced along the z direction with height key. Similar to LinearPull class, the magnitude of force can be controlled by wallforce key.

Function Requests

For function request related to mechanochemistry simulations and force analysis tools please contact author.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

OpenMechanochem-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

OpenMechanochem-1.0.0-py2.py3-none-any.whl (15.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file OpenMechanochem-1.0.0.tar.gz.

File metadata

  • Download URL: OpenMechanochem-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for OpenMechanochem-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c9ce6f401e3bce084d085d8468634615b48b9e47ef38b337f6d178c332475529
MD5 76a2221c12e85b4e65922bfcf4d1094e
BLAKE2b-256 42835ee906fa4fa91c26de061fb6acf1dd52412d4a6ff2f56a107d97ffed5acd

See more details on using hashes here.

File details

Details for the file OpenMechanochem-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: OpenMechanochem-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for OpenMechanochem-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8b11b6467c11851c4d54204032752da955aa7cb5a2bab32309064827cae4555c
MD5 597de326b7ae0513f6a7f48c035e0b3a
BLAKE2b-256 76a32a20917cebada3a998cbd81b9bffe7d833a069a2f729b72d1f254c377411

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page