Giter VIP home page Giter VIP logo

infretis's Introduction

∞RETIS

Tests Coverage Status Code style: black

Introduction

∞RETIS is a Python library designed to facilitate Replica Exchange Transition Interface Sampling (RETIS). ∞RETIS interfaces with molecular dynamics (MD) programs such as GROMACS, LAMMPS, and CP2K, offering researchers an efficient and flexible tool for advanced simulations.

Our recent publication Highly Parallelizable Path Sampling with Minimal Rejections Using Asynchronous Replica Exchange and Infinite Swaps showcases the capabilities of ∞RETIS. We are also in the process of preparing a detailed paper specifically about this software library.

Features

Installation

∞RETIS can be installed via pip:

pip install infretis

🚧👷 The latest development version can be installed with:

python -m pip install git+https://github.com/infretis/infretis.git@main

⚠️ Note: ∞RETIS does not manage the installation of external MD programs. Users are responsible for installing and configuring these programs independently.

Examples

We have provided several examples to help you get started with ∞RETIS:

Citation

If you use ∞RETIS in your research, please cite our paper: Highly Parallelizable Path Sampling with Minimal Rejections Using Asynchronous Replica Exchange and Infinite Swaps

To cite ∞RETIS in your work, please use the following BibTeX entry:

@article{zhang_highly_2024,
	title = {Highly parallelizable path sampling with minimal rejections using asynchronous replica exchange and infinite swaps},
	volume = {121},
	url = {https://www.pnas.org/doi/10.1073/pnas.2318731121},
	doi = {10.1073/pnas.2318731121},
	number = {7},
	journal = {Proceedings of the National Academy of Sciences},
	author = {Zhang, Daniel T. and Baldauf, Lukas and Roet, Sander and Lervik, Anders and van Erp, Titus S.},
	year = {2024},
	publisher = {Proceedings of the National Academy of Sciences},
}

License

∞RETIS is licensed under the MIT License. Please see the file LICENSE

infretis's People

Contributors

andersle avatar dz24 avatar lukasbaldauf avatar sroet avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

infretis's Issues

Smart restart

Currently, whenever we restart an airetis simulation that was stopped due to i.e. HPC job time limit, we start the shooting moves anew instead of continuing from where we left off. This should be fixed.

Path lengths

In some cases, path lengths are incorrectly set to 10'000 in infretis_data.txt and sim.log, when they are longer (as in order.txt, traj.txt, energy.txt)

Cp2k engine energy file

In the new cp2k engine, the executable is sometimes stopped before a line in the energy file is completed, throwing an error regarding the number of lines in the energy file. This can be solved by e.g. also reading energies on the fly using the ReadAndProcessOnTheFly class in cp2k.py. This lets one also use energies as order parameters.

npt with cp2kengine

Currently, the cp2kengine can only be used with fixed volume simulations, as no box information is read.

gromacs engine

Check that the shooting point coordinates are not modified when shooting and that the order parameter does not change. There are some rounding-off errors when comparing conf.g96 and genvel.g96 that can result in "KOB" for 001 ensembles. This is not checked in higher ensembles.

Check whether restart or start.

Currently, if we want to restart a simulation, but run infretis.toml instead of restart.toml, I think we start a new simulation, erasing info from the previous run. Make a checker for this.

gromacs .gro or .g96 format in load path

If the load path contains frames from a .gro file and we set the gromacs extension to .g96 in infretis.toml, we can run into format problems because gmx trjconv creates .g96 files with the POSITIONRED entry.

Reverse velocities in order calculation

It seems that in engines cp2k, lammps, and turtlemd the velocities are reversed when calculating the orderparameter if system.vel_rev =True. In gromacs this is also done in _propagate_from(), so they seem to be reversed twice.

gromacs velocity generation

It seems that the velocity distribution obtained with gromacs using gen-vel is not the boltzmann distribution. Therefore, the distribution of the old shooting point (which is a boltzmann distribution if equilibrated during path sampling) and the generated velocities (using gmx gen-vel) are different, and they do not cancel in the detailed balance relation (flexible length shooting acceptance criteria)?

Random generators

How should we generate random numbers? We can't reproduce results for multiple workers if we can't reproduce the length of jobs.

Large .git folder

Not sure why, but the .git folder is pretty large (around 180Mb). Does that folder contain trajectory data from the older version?

NVE or NVT dynamics in infretis simulation with LAMMPS

Dear developers,

Thanks so much for the development.
I'm very interested in applying this method to my work.

I'd like to ask some questions about the path generated by infretis.
I'm using LAMMPS to propagate the trajectory.

As shown in the example, the LAMMPS input file is specified like this:

# variables to be replaced by infretis
variable 	subcycles index infretis_subcycles
variable	timestep index infretis_timestep
variable	nsteps index infretis_nsteps
variable	initconf index infretis_initconf
variable	name index infretis_name
variable 	lammpsdata index infretis_lammpsdata
variable	temperature index infretis_temperature
variable	seed index infretis_seed

units real
atom_style full

dimension 3
boundary p p p

pair_style lj/cut/coul/cut 12.0 12.0
pair_modify mix arithmetic tail yes

read_data ${lammpsdata} # add
read_dump ${initconf} 0 x y z vx vy vz box yes # add

fix 1 all nve
fix 2 all langevin ${temperature} ${temperature} 500.0 ${seed}

thermo ${subcycles}
thermo_style custom step ke pe etotal temp

dump 1 all custom ${subcycles} ${name}.lammpstrj id type x y z vx vy vz # add
dump_modify 1 pbc yes

timestep ${timestep} # add

run ${nsteps} # ad

The input shows the temperature is controlled by Langevin thermostat.
However, controlling the temperature makes the path is not time-reversible.

My questions are as follows.

  1. Should it be better if I use NVE instead? Then what happen to the temperature we specified in the toml file?
  2. Is there a difference between infretis temperature for path sampling and the temperature in the propagating trajectory?

I'd very appreciate if you can give some comments..

Remove parameters from .toml

Remove reading parameter settings such as temperature in .toml. This avoids setting properties twice (once in the MD program and once in Infretis). It also avoids the need to create checks for these parameters and keeps the .toml file short.

lammps engine

Lammps engine does not seem to run atm. Something with "w_folder" in md_items in set_mdrun()

turtlemd sometimes swaps between being 1 dimensional and 3 dimensional

when printing system. pos during running an turtlemd example, i get this print:

[[-0.59088819]]
[[-0.60531565]]
[[-0.96885362]]
[[-0.89629269 0. 0. ]]
[[-0.9860715]]
[[-0.62093541]]
[[-1.00346005]]
[[-0.63712565]]
[[-0.65330699]]
[[-0.89629269 0. 0. ]]
[[-0.67145479]]
[[-0.69098102]]
[[-0.89629269]]
[[-0.80553152 0. 0. ]]
[[-0.90316301]]
[[-0.71127474]]

Option to save first/last phasepoints of a path

It would be nice to have some flexible saving options for phase points or whole paths based on some conditions, e.g., save all reactive trajectories, etc. This saves disk space and is useful when one wants to continue a trajectory from the stable states to see if they actually stay there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.