Dear LAMMPS-users and -developers,
sorry in advance for the long mail. I am trying to create a fix that would
enable molecular dynamics runs with intermittent minimization of a subset of
degrees of freedom (DOFs) of a system. I.e., minimize subset of DOFs, get
forces, and then integrate Newton’s equations of motion, and repeat. This could
be useful, e.g., for massless core-shell/drude-particle simulations. This
methodology is less efficient than the already implemented
adiabatic/dual-thermostat models, but tends to be more accurate.
This has brought up before on the list, but I haven’t seen any corresponding
implementation, yet. I could really need this methodology and am willing to
spend time working on the implementation, but I would really appreciate if some
of the experts could maybe give me some pointers…
As far as I can see, LAMMPS has all the basic tools/features needed to do the
subsytem minimization without too much hazzle (or so I thought in the
beginning). So no new methods would be necessary, but one would need to combine
the sub-units in LAMMPS in the right fashion. That’s basically what I tried in
the attached source files. For all what follows I used the LAMMPS-ICMS May23rd
2016. My basic workflow/idea within the fix is as follows:
- create a group that contains degrees of freedom not included in the fixes
group (call it FRZGRP) - create a setforce fix for FRZGRP (call it SETFORCE)
- register said fix with min_post_force (need to be friends with modify
class) - create an instance of the Min class in update (as done in regular minimize
run) - use that instance to minimize energy
- also need some contents of the minimize->setup method, hence be friends
with Min class
For the last couple of points I tried to use as many high level methods as
possible (that’s why I needed to declare FixSubsysMin a friend class to Min and
Modify).
For now the implementation seems to do on a basic level what it’s supposed to be
doing. Minimize once per step and run one MD steps, and repeat. I attached an
example simulation that contains 256 polarizable SPC water models. The
simulation runs stably using the dual-thermostatting, which I used to
pre-equilibrate the structure in the test run. I tried to use my fix together
with different propagators for the equations of motion.
If I do not constrain the water molecules I always run into problems with
polarization catastrophe. If I use fix rigid/nvt/small to integrate the EOM the
system heats up until another catastrophe. If I use fix nvt integration and
shake the simulation crashes even earlier.
I am quite a bit at a loss right now, and would appreciate if someone more
familiar with LAMMPS could take a look and give me an opinion if this fix could
work and where to go on/improve/fix things.
Thank you very much in advance and best regards,
Frank
min.h.patch (316 Bytes)
modify.h.patch (367 Bytes)
fix_subsys_min.cpp (5.82 KB)
fix_subsys_min.h (1.23 KB)
data.pol (126 KB)
tst.in (1.29 KB)