Skip to main content

Database of interaction models for molecular dynamics and Monte Carlo simulations

Project description

Berni

pypi version license Binder pipeline coverage report

A database of interaction models and trajectory samples for molecular dynamics and Monte Carlo simulations. Berni can export interaction models to a range of simulation backends, such as atooms, LAMMPS, RUMD.

Quick start

Get info on the available models

import berni
for model in berni.models:
    print(f'- "{model["name"]}": {model["description"]}')
- "bernu_hiwatari_hansen_pastore": Binary soft-sphere mixture with size ratio of 1.4
- "coslovich_pastore": Short-ranged pairwise-additive model for silica
- "dellavalle_gazzillo_frattini_pastore": Binary Lennard-Jones mixture model for NiY alloys
- "gaussian_core": One-component Gaussian core model with long-range cutoff
- "grigera_cavagna_giardina_parisi": Binary soft-sphere mixture with size ratio of 1.2 and smooth cutoff
- "harmonic_spheres": Binary mixture of harmonic spheres with size ratio of 1.4
- "kob_andersen": Binary Kob-Andersen Lennard-Jones mixture
- "kob_andersen_2": Ternary Kob-Andersen Lennard-Jones mixture
- "lennard_jones": One-component Lennard-Jones model
- "roux_barrat_hansen": Binary soft-sphere mixture with size ratio of 1.2
- "roy_heyde_heuer-II": Variant of roy_heyde_heuer with optimized parameters               
- "roy_heyde_heuer": 2d model of a silica bilayer
- "wahnstrom": Binary Lennard-Jones mixture with size ratio of 1.2

Get a specific model as a dictionary in the default schema

berni.models.get("lennard_jones")

Print the qualified names of the available samples

for sample in berni.samples():
    print(sample["path"])
coslovich_pastore-488db481cdac35e599922a26129c3e35.xyz
lennard_jones-13ce47602b259f7802e89e23ffd57f19.xyz
roy_heyde_heuer-II-b8d70742799933357ea83314590d2b4d.xyz
lennard_jones-5cc3b80bc415fa5c262e83410ca65779.xyz
kob_andersen-8f4a9fe755e5c1966c10b50c9a53e6bf.xyz
bernu_hiwatari_hansen_pastore-f61d7e58b9656cf9640f6e5754441930.xyz
grigera_cavagna_giardina_parisi-0ac97fa8c69c320e48bd1fca80855e8a.xyz

Get a local copy of a Lennard-Jones fluid sample

local_file = berni.samples.get("lennard_jones-5cc3b80bc415fa5c262e83410ca65779.xyz")

The local_file can then be used to start a simulation or further analysis.

Export a model for a simulation backend

berni.models.export("kob_andersen", backend='lammps')
pair_style lj/cut 1.0
pair_coeff 1 1 1.0 1.0 2.5
pair_coeff 1 2 1.5 0.8 2.0
pair_coeff 2 2 0.5 0.88 2.2
pair_modify shift yes

Documentation

Check out the documentation for full details.

Installation

Clone the code repository and install from source

git clone https://framagit.org/coslo/berni.git
cd sample
make install

Install berni with pip

pip install berni

Contributing

Contributions to the project are welcome. If you wish to contribute, check out these guidelines.

Authors

Daniele Coslovich: https://www.units.it/daniele.coslovich/

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

berni-0.2.0.tar.gz (92.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

berni-0.2.0-py3-none-any.whl (98.3 kB view details)

Uploaded Python 3

File details

Details for the file berni-0.2.0.tar.gz.

File metadata

  • Download URL: berni-0.2.0.tar.gz
  • Upload date:
  • Size: 92.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for berni-0.2.0.tar.gz
Algorithm Hash digest
SHA256 06f132df7d7cfa9c2959333569fc4a842ad4193a508cb5f27b71f27bb0bd9478
MD5 83c8b727c3ac0ccc8687b3a4c76868ac
BLAKE2b-256 f77e41f86661505e2e159435c56d2805e741fb987060467c30567ded68519dc4

See more details on using hashes here.

File details

Details for the file berni-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: berni-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 98.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for berni-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41477d4b2a441dc6bb9a0fad54e1c37dc9bcbecd782e30ec990434377c2924f4
MD5 a4431dba75be8fe2b233a52f3f953c1e
BLAKE2b-256 4e1efd3c1bca7983f0f94320ad7caaf7b85999e48e8c439cbf4ccfa5a3c1defa

See more details on using hashes here.

Supported by

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