# Enhanced Monte Carlo (EMC) Python Interface
[](https://pypi.python.org/pypi/emc-pypi/)
[](https://pypi.python.org/pypi/emc-pypi/)
This module is a thin Python wrapper library of the [EMC](http://montecarlo.sourceforge.net/emc/Welcome.html) 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.
- See the [example input files](https://github.com/kevinshen56714/emc-pypi/tree/main/pyemc/emc/examples/setup) on how to prepare EMC input (.esh) files.
- See the [docs](https://github.com/kevinshen56714/emc-pypi/blob/main/pyemc/emc/docs/emc.pdf) to understand more about EMC.
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
```bash
pip install emc-pypi
```
## Usage
```python
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](https://github.com/kevinshen56714/emc-pypi/tree/main/example). Once installed, you can run the example by:
```python
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](https://github.com/kevinshen56714/emc-pypi/tree/main/pyemc/emc/examples/setup)
## 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](https://pubs.acs.org/doi/full/10.1021/ma0346658)] [[pdf](https://pubs.acs.org/doi/pdf/10.1021/ma0346658)]
Raw data
{
"_id": null,
"home_page": "https://github.com/kevinshen56714/emc-pypi",
"name": "emc-pypi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "EMC, Molecular Dynamics, LAMMPS, SMILES, Simulation",
"author": "Kuan-Hsuan (Kevin) Shen",
"author_email": "kevinshen56714@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c5/77/8d093c2b2820cc8b4b549e9a0507e8ee708ce2403fe2dd1cd9af70f00995/emc-pypi-2025.8.21.tar.gz",
"platform": null,
"description": "# Enhanced Monte Carlo (EMC) Python Interface\n\n[](https://pypi.python.org/pypi/emc-pypi/)\n[](https://pypi.python.org/pypi/emc-pypi/)\n\nThis module is a thin Python wrapper library of the [EMC](http://montecarlo.sourceforge.net/emc/Welcome.html) package that allows you to use all EMC functionalities with Python interface. No pre-installation of EMC is needed.\n\nEMC 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.\n\n- See the [example input files](https://github.com/kevinshen56714/emc-pypi/tree/main/pyemc/emc/examples/setup) on how to prepare EMC input (.esh) files.\n- See the [docs](https://github.com/kevinshen56714/emc-pypi/blob/main/pyemc/emc/docs/emc.pdf) to understand more about EMC.\n\nThe 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.\n\n## Installation\n\n```bash\npip install emc-pypi\n```\n\n## Usage\n\n```python\nimport pyemc\n\n# Run the emc.pl and generate the build.emc file for the build command\npyemc.setup('your-setup-file.esh')\n\n# Or you can pass in arguments like this\npyemc.setup('your-setup-file.esh', '-ntotal=1000', '-field=opls-aa')\n\n# Finally, run the emc executable to create simulation input files\npyemc.build('build.emc')\n```\n\n## Example\n\nExample input files are provided in the [example](https://github.com/kevinshen56714/emc-pypi/tree/main/example). Once installed, you can run the example by:\n\n```python\ncd example\npython example.py\n```\n\nThe example.esh file creates a system with 80% m/m water and 20% m/m alcohol. More examples are available [here](https://github.com/kevinshen56714/emc-pypi/tree/main/pyemc/emc/examples/setup)\n\n## Citation\n\nIn any publication of scientific results based in part or completely on the use of EMC, please cite the original paper:\nP.J. in 't Veld and G.C. Rutledge, Macromolecules 2003, 36, 7358 [[link](https://pubs.acs.org/doi/full/10.1021/ma0346658)] [[pdf](https://pubs.acs.org/doi/pdf/10.1021/ma0346658)]\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Python interface for the Enhanced Monte Carlo (EMC) package",
"version": "2025.8.21",
"project_urls": {
"Homepage": "https://github.com/kevinshen56714/emc-pypi"
},
"split_keywords": [
"emc",
" molecular dynamics",
" lammps",
" smiles",
" simulation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a4c0622d4b759415900b7f51566e26eb609178042a01d21a2058e6ae6537ad38",
"md5": "85f5fa90a2265bca97c710cb72571195",
"sha256": "1e8e1cce97e7bc359b123cab214bfb93069cfd709411d70c9cf0625468a7403e"
},
"downloads": -1,
"filename": "emc_pypi-2025.8.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "85f5fa90a2265bca97c710cb72571195",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 18336772,
"upload_time": "2025-08-21T18:31:56",
"upload_time_iso_8601": "2025-08-21T18:31:56.604050Z",
"url": "https://files.pythonhosted.org/packages/a4/c0/622d4b759415900b7f51566e26eb609178042a01d21a2058e6ae6537ad38/emc_pypi-2025.8.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c5778d093c2b2820cc8b4b549e9a0507e8ee708ce2403fe2dd1cd9af70f00995",
"md5": "661046dcbec2a9539e4fe41981c35d95",
"sha256": "049b4e8026b95f3afc2c925d9bb75cc817ecd2d657fcff506e1472c99139b2d3"
},
"downloads": -1,
"filename": "emc-pypi-2025.8.21.tar.gz",
"has_sig": false,
"md5_digest": "661046dcbec2a9539e4fe41981c35d95",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17961100,
"upload_time": "2025-08-21T18:31:58",
"upload_time_iso_8601": "2025-08-21T18:31:58.784835Z",
"url": "https://files.pythonhosted.org/packages/c5/77/8d093c2b2820cc8b4b549e9a0507e8ee708ce2403fe2dd1cd9af70f00995/emc-pypi-2025.8.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-21 18:31:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kevinshen56714",
"github_project": "emc-pypi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "emc-pypi"
}