I am modifying lammps source code for my specific purpose. I have created a new atom style which has a molecule id, bonds, angles, a dipole, and a new custom value lets call activity. Currently it is set up so that it reads a data file which has all of these things as inputs. Some different number of atoms are part of the same molecule and have the same molecule id are bonded together, and have an input activity (for each atom) which is different for each molecule but the same for all atoms which are part of the same molecule. I want to be able to modify the value of this activity at different times for different molecules during the simulation. I tried to have each atom use the activity of a specific "leader" atom that is part of it's molecule but this didn't work because atoms that are on different threads will have different indices so I can't see how to get it to take the activity of a specific atom from a different thread. I think maybe I need to define a variable that is a vector of the activity for each molecule, and the atoms can read the activity from this variable whenever they need to use it. Is this a thing that variables can do? If so how can I go about implementing this? Do I need to create the variable using the variable command in my input script? And then I can use it within the code to modify it's values mid simulation?
Asked
Active
Viewed 79 times