Dear Lammps users,
I want to simulate Bimolecular kinetics in Lammps by implementing following steps.
The system comprises of 1 particle of type 1 and 50 particles of type 2. Lammps version is 9 Nov 2016.
Step1. Simulate a Brownian dynamics of 2 types particles (Succeeded)
I used a periodical box and run with fix nve+ fix langevin.
Step2. Find collision rates between type 1 and 2 (No idea how to do)
My approach is to look at each timestep and consider when there is more than 1 particle in a spherical region with radius of rz. The spherical volume (region ball) has the origin of type1 particle. If there is more than 1 particle, the ID and xyz are recorded and the simulation restart with timestep equals to 0.
So, I have tried to use command region and command group dynamics to define spherical region from type1 particle. The problem was the position of type1 particle was not updated during the simulation run.
Moreover I was looking for a way for Lammps to make decision before go to next timestep with condition that “number of particle in Vrz (ngroup) >= 2”.
Here are my questions regarding to Step2.
Q1: How can I update the origin of spherical region at each timestep?
Q2: How can I make Lammps go to conditional if clause before go to next timestep?
The goals of this simulation are to find timestep at which particle type1 and 2 are in a spherical region since timestep =0 and coordinate of particles.
If you guys have a better idea how to write a code, please help.
Below is my code.
Dear Lammps users,
I want to simulate Bimolecular kinetics in Lammps by implementing following steps.
The system comprises of 1 particle of type 1 and 50 particles of type 2. Lammps version is 9 Nov 2016.
Step1. Simulate a Brownian dynamics of 2 types particles (Succeeded)
I used a periodical box and run with fix nve+ fix langevin.
Step2. Find collision rates between type 1 and 2 (No idea how to do)
My approach is to look at each timestep and consider when there is more than 1 particle in a spherical region with radius of rz. The spherical volume (region ball) has the origin of type1 particle. If there is more than 1 particle, the ID and xyz are recorded and the simulation restart with timestep equals to 0.
So, I have tried to use command region and command group dynamics to define spherical region from type1 particle. The problem was the position of type1 particle was not updated during the simulation run.
this sounds like you should be using compute coord/atom
Moreover I was looking for a way for Lammps to make decision before go to next timestep with condition that “number of particle in Vrz (ngroup) >= 2”.
what kind of decision? what should be done differently after you have identified atoms with a sufficient number of neighbors within the given cutoff. if any such atom exists, can be evaluated via an atom style variable that has a comparison between the coord/atom compute and the desired value, and then doing a reduction via compute reduce on that variable.
please note, that if statements in LAMMPS are global break up MD runs into partial runs.
Here are my questions regarding to Step2.
Q1: How can I update the origin of spherical region at each timestep?
using regions is the wrong approach.
Q2: How can I make Lammps go to conditional if clause before go to next timestep?
what does that mean?
The goals of this simulation are to find timestep at which particle type1 and 2 are in a spherical region since timestep =0 and coordinate of particles.
if this is only about analysis. just record the output of compute coord/atom alongside the atom coordinates and types in a custom dump file and postprocess the dump file.
axel.
Dear Lammps users,
I found something very strange to happen with compute coord/atom. I got an error with compute coord/atom. The error says “ERROR: Expected floating point parameter in input script or data file (…/compute_coord_atom.cpp:40)”. Below are my input script and log file.
Dear Lammps users,
I found something very strange to happen with compute coord/atom. I got an error with compute coord/atom. The error says “ERROR: Expected floating point parameter in input script or data file (…/compute_coord_atom.cpp:40)”. Below are my input script and log file.
have you looked at the documentation for your specific version of LAMMPS?
the online documentation always reflects the very latest patch version of LAMMPS and may have backward incompatible changes.
please also note, that a per-atom output is best output in a custom dump, not as thermodynamic output, which is for scalar data.
axel.
Dear Axel,
Thank you very much. It works. 
Regards,
Pakorn