mcpy
Python package designed to run atomistic Monte Carlo simulations.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Keywords
Repository
Python package designed to run atomistic Monte Carlo simulations.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
mcpy
mcpy is a Python package designed to run atomistic Monte Carlo simulations. It provides tools for performing Grand Canonical Monte Carlo (GCMC) simulations using the Atomic Simulation Environment (ASE) and other dependencies.
Features
- Grand Canonical Monte Carlo simulations
- Integration with ASE for atomic simulations
- Support for MACE calculator potential and other calculators
- Configurable simulation parameters and logging
Installation
To install the mcpy package, ensure you have Python 3.11 or higher and run the following commands:
sh
pip install .
Alternatively, you can install the package in editable mode:
sh
pip install -e .
Please note that mpi4py should be installed using conda:
sh
conda install mpi4py
Dependencies
The package requires the following dependencies:
ase>=3.23.0mace-torch>=0.3.9mpi4py>=4.0.1
Usage
Here is an example of how to use the mcpy package to run a GCMC simulation:
```python from mcpy.ensembles.grandcanonicalensemble import GrandCanonicalEnsemble from ase.calculators.lj import LennardJones from ase import Atoms from mcpy.moves import DeletionMove, InsertionMove, DisplacementMove from mcpy.moves.move_selector import MoveSelector
class Calculator(): def init(self) -> None: self.calculator = LennardJones(sigma=3.4, epsilon=0.010086, rc=10.2, smooth=True)
def get_potential_energy(self, atoms):
atoms.calc = self.calculator
return atoms.get_potential_energy()
lj = Calculator() atoms = Atoms('Ar', cell=[27.2, 27.2, 27.2], pbc=True) lj.getpotentialenergy(atoms)
box = atoms.get_cell() species = ['Ar']
movelist = [[25, 25, 50], [DeletionMove(species=species, seed=12, operatingbox=box), InsertionMove(species=species, seed=13, operatingbox=box), DisplacementMove(species=species, seed=14, maxdisplacement=1.7)]]
moveselector = MoveSelector(*movelist)
Temp = 87.79
gcmc = GrandCanonicalEnsemble( atoms=atoms, calculator=lj, mu={'Ar': -8.4*0.010086}, unitstype='metal', species=species, temperature=Temp, moveselector=moveselector, outfile=f'T{Temp}.out', trajectorywriteinterval=1, outfilewriteinterval=1, trajfile=f'T{Temp}.xyz')
gcmc.run(1000000) ```
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Owner
- Name: Riccardo Farris
- Login: farrisric
- Kind: user
- Company: @reac-nps
- Repositories: 1
- Profile: https://github.com/farrisric
PhD Student in Theoretical and Computational Chemistry in the @reac-nps group at the Universidad de Barcelona,
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "mcpy: a python package designed to run atomistic Monte Carlo simulations"
authors:
- family-names: "Farris"
given-names: "Riccardo"
affiliation: "Universitat de Barcelona"
- family-names: "Telari"
given-names: "Emanuele"
affiliation: "Universitat de Barcelona"
date-released: "2025-05-01"
version: "1.0.0"
doi: "10.5072/zenodo.262131"
url: "https://github.com/farrisric/mcpy"
license: "MIT"
GitHub Events
Total
- Release event: 1
- Delete event: 9
- Issue comment event: 1
- Member event: 1
- Push event: 83
- Pull request event: 16
- Fork event: 1
- Create event: 17
Last Year
- Release event: 1
- Delete event: 9
- Issue comment event: 1
- Member event: 1
- Push event: 83
- Pull request event: 16
- Fork event: 1
- Create event: 17
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- farrisric (8)