Skip to content

kevinshen56714/emc-pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enhanced Monte Carlo (EMC) Python Interface

PyPI version shields.io PyPI download month

This module is a thin Python wrapper library of the EMC package that allows you to use all EMC functionalities with Python interface. No pre-installation of EMC is needed.

EMC creates input structures from SMILES strings and LAMMPS input files for particle simulations with atomistic force fields - Born, COMPASS, PCFF, CHARMM, OPLS, TraPPE or coarse-grained force fields - DPD, Martini, SDK.

The package works out of the box without pre-installation of EMC or any configuration. Please open an issue if you find something missing or not working as expected.

Installation

pip install emc-pypi

Usage

import pyemc

# Run the emc.pl and generate the build.emc file for the build command
pyemc.setup('your-setup-file.esh')

# Or you can pass in arguments like this
pyemc.setup('your-setup-file.esh', '-ntotal=1000', '-field=opls-aa')

# Finally, run the emc executable to create simulation input files
pyemc.build('build.emc')

Example

Example input files are provided in the example. Once installed, you can run the example by:

cd example
python example.py

The example.esh file creates a system with 80% m/m water and 20% m/m alcohol. More examples are available here

Citation

In any publication of scientific results based in part or completely on the use of EMC, please cite the original paper: P.J. in 't Veld and G.C. Rutledge, Macromolecules 2003, 36, 7358 [link] [pdf]