Re: QM/MM simulations with live solvent

From: Marcelo C. R. Melo (melomcr_at_gmail.com)
Date: Fri Aug 21 2020 - 09:51:26 CDT

Hi Oleksii,

Yes, this problem is completely avoidable, and in fact is not related to
LSS, but to QM/MM MD simulations in general.

It is important to *begin* the QM/MM MD simulation with a contiguous QM
region. You can always use VMD to re-center your box around a
particular residue or molecule, such as your H2O2, when re-starting a job
or continuing from a previous run. In fact, it seems you are already using
a TCL script to set up the selection of QM atoms in new runs, so it should
be easy to integrate a re-centering step to that script. See
http://www.ks.uiuc.edu/Research/vmd/plugins/pbctools/ .

However, QM atoms moving across periodic boundary conditions will not be a
problem *during* QM/MM MD simulations because NAMD will unwrap the QM
region and surrounding point charges before passing them to ORCA (or any
other QM software). The difference here is that during a simulation, NAMD
knows which atoms have "jumped" across the box to the other end of the
system, and can undo the jump. We don't have that information when the
simulation starts.

Best,
Marcelo

On Thu, 20 Aug 2020 at 09:43, Oleksii Zdorevskyi <zdorevskyi_at_bitp.kiev.ua>
wrote:

> Dear Marcelo,
>
> Thanks very much for your response. I ran the task without any
> parallelism, and the error disappeared.
>
> However, after running few more consequent simulations (as my QM region
> has approached very close to the border of the simulation box), I've
> obtained another issue:
>
> ERROR: Atom 161 velocity is 2.11773e+07 -1.20344e+07 1.59961e+07 (limit is
> 20000, atom 124 of 820 on patch 0 pe 0)
> ERROR: Atom 492 velocity is -3.36555e+08 1.91253e+08 -2.54216e+08 (limit
> is 20000, atom 389 of 820 on patch 0 pe 0)
> ERROR: Atoms moving too fast; simulation has become unstable (2 atoms on
> patch 0 pe 0).
>
> When examining dcd trajectory, it seems that these errors occur due to the
> boundary conditions when LSS molecules are "jumping" between the walls of
> the simulation box.
>
> Is it possible to overcome this problem?
>
> Thanks.
>
> All the necessary input and output files are uploaded here:
>
> https://drive.google.com/file/d/1lE6mGWwDcHY_nAeBbEiez4isDYzK5jCn/view?usp=sharing
>
> Best regards,
> Oleksii
>
> > Hi Oleksii,
> > Thank you for the email and the minimal example. I could reproduce your
> > problem locally, and from what I can tell, It seems to be an internal
> > message passing issue inside NAMD. Your QM region selection seems to be
> > OK.
> >
> > NAMD is complaining about not getting the correct number of QM atoms, but
> > the QM output from ORCA actually does have the right number of atoms, and
> > they are read by NAMD. However, when loading the QM atoms and sharing the
> > information across the multiple cores processing the MD simulation,
> > something gets lost.
> >
> > The immediate work-around seems to be running NAMD in a single core,
> > avoiding the updating of QM and MM water molecules from being
> communicated
> > across cores. I initially ran your test system in 6 cores and got the
> > error, but running with 1 core completely avoided the issue (I ran over
> > 1200 steps so far with no issue).
> > It just so happens that on my workstation, using NAMD in just one core
> > does
> > not slow the simulation down since for just 820 atoms, the QM cost is
> much
> > greater.
> >
> > In any case, this should be fixed since parallelism will be very relevant
> > for larger systems. I'll check into this in more detail as soon as I can.
> >
> > LSS is an experimental feature that few people have used, so I am happy
> to
> > get any feedback you may have.
> >
> > Best,
> > Marcelo
> >
> >
> > On Thu, 6 Aug 2020 at 06:17, Oleksii Zdorevskyi <zdorevskyi_at_bitp.kiev.ua
> >
> > wrote:
> >
> >> Dear NAMD developers,
> >>
> >> I am new in performing QM/MM simulations with Live Solvent and have some
> >> issues that do not allow me to move on with my calculations. I was
> >> looking
> >> for some information about it in google and I managed to find only the
> >> description of the few options in the NAMD manual
> >> (http://www.ks.uiuc.edu/Research/qmmm/). Unfortunately, this
> information
> >> was not sufficient for me to understand and use the LSS properly. So I
> >> ask
> >> you for a help to clarify some things.
> >>
> >> In my config file (qm2.conf) I use the following options for LSS:
> >>
> >> qmLiveSolventSel on
> >> qmLSSFreq 20
> >> qmLSSMode dist
> >> qmLSSRef 1 P1 1
> >>
> >> However, after a certain step I obtain the following error:
> >> ERROR: The number of QM atoms received (31) is different than expected:
> >> 28
> >> FATAL ERROR: Problems broadcasting QM atoms.: No such file or directory
> >>
> >> or
> >> ERROR: The number of QM atoms received (31) is different than expected:
> >> 28
> >> FATAL ERROR: Problems broadcasting QM atoms.: Success
> >>
> >>
> >> I also attempted to reduce qmLSSFreq as well as changing LSSMode from
> >> "dist" to "COM" but this led to the same results.
> >>
> >> So, at a certain step the program does not exchange some of the solvent
> >> molecules to the classical?
> >>
> >> Are these issues connected with the inappropriate choice of the QM
> >> simulation region or it is just a bug of LSS in NAMD?
> >>
> >>
> >> My simulation system is quite simple - hydrogen peroxide molecule (H2O2)
> >> in a water box. My QM region is: H2O2+the surface of the water molecules
> >> that are situated close to H2O2. As I understand it properly, solvent
> >> molecules are not appointed in QM region automatically, and each water
> >> molecule must be indicated manually in the corresponding qm-region file.
> >> So I just make an appropriate selection in VMD for the all the molecules
> >> which are situated for example in 3.5 Angstrom from H2O2 and appoint
> >> them
> >> to the same QM region as H2O2 (beta column in file qm_atoms.pdb). Is it
> >> the right way to define QM solvent molecules?
> >>
> >> All the necessary simulation files I have uploaded here:
> >>
> >>
> https://drive.google.com/file/d/1mR7P5TkH5s0g7Iq0mcSu_Wm1aF2ZjkWC/view?usp=sharing
> >> .
> >>
> >> I will appreciate any help and information.
> >>
> >> Best regards,
> >> Oleksii
> >>
> >>
> >>
> >
>
>
>

This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:09 CST