QMMM with lammps

Dear All,

I would like to use lammps to perform QMMM calculations using our

own QM-MM interface.

In order to do that, we need lammps to handle external charges. This means

that at each MD step, the forces on the QM atoms due to the MM point charges are calculated, as well as the forces on the MM charges due to interaction with the QM atoms.
Does lammps allows to calculate forces on point charges?

If yes, which is the command to do that?

Thank you all for your willingness,

Daniele Selli

Dear All,

I would like to use lammps to perform QMMM calculations using our
own QM-MM interface.
In order to do that, we need lammps to handle external charges. This means
that at each MD step, the forces on the QM atoms due to the MM point
charges are calculated, as well as the forces on the MM charges due to
interaction with the QM atoms.

​this is a rather vague description and thus difficult to provide any
specific advice.​

Does lammps allows to calculate forces on point charges?

​interaction with point charges is what all */coul/* styles do. again,
because if your vague description, it is not possible to provide a specific
answer.​

If yes, which is the command to do that?

​it is unlikely that you will be able to set this up without some C++
programming.
there are multiple ways, how LAMMPS is coupled to external programs.
- there is the generic QM/MM library in LAMMPS that currently couples
LAMMPS to quantum espresso, where there is a driving code, which uses
different MPI partitions and through that manages 2 copies of LAMMPS and 1
copy of quantum espresso and then a fix qmmm to communicate the information
between the different partitions.
- there is the LATTE package, which couples LAMMPS to a tight-binding code,
where LAMMPS is the driver and then the LATTE code is called through a
library interface from fix latte
- there is the coupling of LAMMPS to the DFTB+ code, where the DFTB+ code
is the driver and interaction with LAMMPS is handled through callback
functions registered with fix external

i suggest you study those three examples and the related documentation and
readme files. then identify which of those is closest to what you need and
then copy/rename/adapt the corresponding code to your needs.

axel.

Dear Axel,

thank you for your reply.

I knew about the first point you reported on LAMMPS coupled to quantum espresso, but the second and third points

are new to me. However, it seems that there isn’t a proper QM-MM interaction between the LATTE or DFTB+ codes and lammps.

I try to be more specific with my problem. I know you can set a certain charge for atoms in lammps,

and on those atoms the code can calculate potential and forces.

But I would like to know if I can define external charges, just charges not charged atoms and if on these

POINT charges the code can calculate electrostatic potential (I am pretty sure it does) and forces (not all

codes calculate forces on external point charges).

Daniele

Dear Axel,

thank you for your reply.
I knew about the first point you reported on LAMMPS coupled to quantum
espresso, but the second and third points
are new to me. However, it seems that there isn't a proper QM-MM
interaction between the LATTE or DFTB+ codes and lammps.

​i didn't mention those as examples for QM/MM but as examples for coupling
two codes.​

I try to be more specific with my problem. I know you can set a certain
charge for atoms in lammps,
and on those atoms the code can calculate potential and forces.
But I would like to know if I can define external charges, just charges
not charged atoms and if on these
POINT charges the code can calculate electrostatic potential (I am pretty
sure it does) and forces (not all
codes calculate forces on external point charges).

​i don't see the particular difference between point charges and "atoms".

​what you describe is what typically the QM/MM *interface* code does, not
the classical MD code. there is no predefined mechanism for adding external
charges, but it would be trivial to include their effect by defining them
as additional atoms (that are not time integrated and for which the
interaction can be selectively set through the pair_coeff settings). the
only codes where i have seen a feature to compute interactions with a
(usually fixed in space) point charge field are QM software packages.

of course you can define your own computations and have them any which way
you want, but then you have to program your own fix style and do this there.

let me repeat, the main problem here is the lack of details of your QM/MM
implementation and its way of coupling. also, it might be helpful to know
which QM and MM codes you are supporting and which mechanism of exchanging
information between those you are using. also, it would be hugely important
to know how you are handling long-range coulomb interactions.

axel.

Ok I will try to figure out how to correctly use massless charged atoms to mimic point charges.

However, the QMMM implementation I would like to use is the one provided by the

Atomic Simulation Environment (ASE) toolkit.

They use what they call “Explicit Interaction QMMM” which I think is a simple electrostatic embedded QMMM scheme.
The QM part can be whatever is interfaced with ASE (I am using GAUSSIAN09), but regarding the MM part they have

few codes interfaced. One of those is AMBER, but since I am kind of more used to LAMMPS I would like to try to merge it

to ASE.

Ok I will try to figure out how to correctly use massless charged atoms to
mimic point charges.

However, the QMMM implementation I would like to use is the one provided
by the
Atomic Simulation Environment (ASE) toolkit.
They use what they call "Explicit Interaction QMMM" which I think is a
simple electrostatic embedded QMMM scheme.
The QM part can be whatever is interfaced with ASE (I am using
GAUSSIAN09), but regarding the MM part they have
few codes interfaced. One of those is AMBER, but since I am kind of more
used to LAMMPS I would like to try to merge it
to ASE.

​ASE already supports LAMMPS:
​https://wiki.fysik.dtu.dk/ase/ase/calculators/lammps.html

​axel.​

Well, you are right it is interfaced but not to perform EI (Expliciti Interaction) - QMMM.
Check out the ~/ase/calculator/lammpsrun.py file.

Well, you are right it is interfaced but not to perform EI (Expliciti
Interaction) - QMMM.
Check out the ~/ase/calculator/lammpsrun.py file.

​why *should* it be there? all i see is that that you need support point
charge interactions from the *QM* code, not the classical code.

at any rate, you should be able to do an ONIOM-style mechanical coupling
(which is what the LATTE and DFTB+ interfaces in LAMMPS do) as a starting
point and then take it from there.

​here is a snippet from their QM/MM ​tutorial:

This section will show you how to setup up various QM/MM simulations. We
will be using GPAW <http://wiki.fysik.dtu.dk/gpaw> for the QM part. Other
QM calculators should be straightforwardly compatible with the
subtractive-scheme SimpleQMMM calculator, but for the Excplicit Interaction
EIQMMM calculator, you would need to be able to put an electrostatic
external potential into the calculator for the QM subsystem.

​axel.​