i'm new to LAMMPS and i'm working on its connection to our own python
program - we use LAMMPS to calculate forces for (parts of) our system.
Therefore, i want to use LAMMPS python connection (as a shared
library). Work-flow of our program is like this:
1) specify type of job (can be QM, QM/MM, adaptive QM/MM,
metadynamics....) & do initialization
2) if needed separate system into subsystems (to e.g. quantum part &
classical part) and pass coordinates & settings to external programs
that calculate forces
3) collect forces (and other interesting properties) from the external
4) calculate forces combining forces from 3), do magic...
5) propagate system
-> repeat from 2)
Therefore, for some type of jobs we need to call external programs fast
and that is why i'm working on connection to LAMMPS. While execution of
commands will be fast via the "lammps_command()" function from
library.cpp (also i added some code so i can pass input as a string so
I don't need to do it command at a time) I'm having problems with
system description, because especially bonds can be broken/created
during the simulation - this is what we do in the 4) "do magic" step -
we can break/create bonds there and we do new connection list in our
program and need to pass it to external MD programs. So my questions
1) can i change bonds of already created system by specifying new
connection list in a way you do by read_data command in "bonds"
section, or in a way you change coordinates of atoms (
lammps.scatter_atoms('x',1,3, NewCoordinates) )
if 1) is not possible:
2) i could create new lammps() object each time step & destroy the old
one. However, is it possible to pass system description in the input
file (e.g. not by a command "read_data data.file" inside input
script file), or I'll need to dig with read_data.cpp?
i'm sorry if these questions (especially the second one) are part of
basic LAMMPS knowledge, but searching google & mailing list gave me no