NPL is a Python library for the simulation and structural optimization of nanoparticles, specifically tailored for bimetallic nanoparticles. Built on the robust ASE (Atomic Simulation Environment), it enables users to easily set up and analyze complex nanoparticle structures across a range of chemical compositions and structures. NPL provides high-level abstractions, making it accessible for both beginners and experienced researchers aiming to perform detailed nanoparticle simulations.
A partial documentation is available at: https://nplib.readthedocs.io/en/latest/
- Python 3.10+
- Atomic Simulation Environment (ASE) >= 3.21
- scikit-learn
- sortedcontainers
You can install NPL with pip:
pip install nplor from github:
git clone https://github.com/farrisric/npl
pip install ./nplThis example demonstrates how to evaluate the topological (TOP) energy of a bimetallic nanoparticle using pretrained coefficients shipped with NPL. A 201-atom truncated-octahedral Pt151Cu50 particle is constructed, its extended topological feature vector is computed, and the energy is evaluated using a TOPCalculator loaded from pretrained linear-model coefficients. The result is a fast, DFT-quality energy estimate without requiring an external calculator.
from npl.core import Nanoparticle
from npl.calculators import TOPCalculator
from npl.descriptors import ExtendedTopologicalFeaturesClassifier
calculator = TOPCalculator(
"ETOP",
stoichiometry="Pt151Cu50",
feature_classifier=ExtendedTopologicalFeaturesClassifier,
)
feature_classifier = calculator.get_feature_classifier()
particle = Nanoparticle()
particle.truncated_octahedron(7, 2, {"Pt": 151, "Cu": 50})
feature_classifier.compute_feature_vector(particle)
energy = calculator.compute_energy(particle)
print(f"TOP energy of Pt151Cu50: {float(energy):.4f}")NPL also optimizes the chemical ordering of multi-metallic nanoparticles by Metropolis Monte Carlo over a fitted energy model (npl.monte_carlo.run_monte_carlo); see examples/multimet_go.ipynb for a trimetallic (Pd/Au/Cu) workflow.
Note:
npl's Monte Carlo samples chemical ordering at fixed composition (canonical). For grand-canonical Monte Carlo with machine-learning interatomic potentials (variable particle number, MACE/alchemi), see the companion package mcpy.
If you use this code, please cite our papers:
@neuman{10.1063/5.0214377,
author = {Felix Neumann and Johannes T Margraf and Karsten Reuter and Albert Bruix},
title = "{Interplay between shape and composition in bimetallic nanoparticles
revealed by an efficient optimal-exchange optimization algorithm}",
archivePrefix = {ChemRxiv},
doi = {10.26434/chemrxiv-2021-26ztp},
}
@article{10.1063/5.0193848,
author = {Farris, Riccardo and Merinov, Boris V. and Bruix, Albert and Neyman, Konstantin M.},
title = "{Effects of Zr dopants on properties of PtNi nanoparticles for ORR catalysis: A DFT modeling}",
journal = {The Journal of Chemical Physics},
volume = {160},
number = {12},
pages = {124706},
year = {2024},
issn = {0021-9606},
doi = {10.1063/5.0193848},
url = {https://doi.org/10.1063/5.0193848},
}
@farris{10.1063/5.0214377,
author = {Farris, Riccardo and Neyman, Konstantin M. and Bruix, Albert},
title = "{Determining the chemical ordering in nanoalloys by considering atomic coordination types}",
journal = {The Journal of Chemical Physics},
volume = {161},
number = {13},
pages = {134114},
year = {2024},
issn = {0021-9606},
doi = {10.1063/5.0214377}
}For any questions or issues, please contact:
- Riccardo Farris: [email protected]
- GitHub Issues: npl Issues
This project is licensed under the MIT License - see the LICENSE file for details.
