[CP2K:3325] Re: hybrid monte carlo and cp2k

Alin Marin Elena alinm... at gmail.com
Tue Jun 28 07:49:16 UTC 2011

Hi Matt,

Thank you very much for you answer and for your tips on both HMC and the input 

here is what I have to do with hybrid MC. I have to run simulations "à la" 
metadynamics (the technique I am going to use is Temperature Accelered Monte 
Carlo, TAMC -- G Ciccotti, S Meloni, Physical Chemistry Chemical Physics,  
353, 1-15, (2011)) in which I deal with an extended system composed of the 
atoms + a set of collective variables. These two subset are coupled by a 
suitable potential. In TAMC, similarly than in metadynamics, these two subset 
are evolved together but the inertia of the collective variables, or other 
parameters controlling the timescale of the dynamics (e.g. the parameters of 
the thermostat), are selected such that the atoms are faster than the 
collective variables (adiabatic condition). At a variance with metadynamics, I 
use two thermostats at different temperatures for the atoms and the collective 
variables (it is the high temperature on the collective variables that allow 
to overcome the free energy barriers possibly present in the system). It can 
be demonstrated that the dynamical system described above samples the 
"marginal" probability density function that the collective variables assume a 
given value, and from this I can reconstruct the free energy of the system 
along these collective variables. in metadynamics (and Temperature Accelerated 
Molecular Dynamics, driven Adiabatic Free Energy Dynamics, etc.) the above 
sampling is performed running MD on both the atoms and the collective 
variables. However, if the collective variables are not analytical I cannot 
compute the force on the atoms coming from the "coupling potential" associated 
to them. This can be solved replacing MD for the evolution of the atoms with 
MC (in metadynamics and similar techniques we use MD only to sample the 
probability density function of the considered ensemble and so we can safely 
replace it with any sampling technique). My problem is that I need to do this 
by ab initio simulations (there are bonds broken and formed in the process I 
am investigating) and in this case the standard MC is quite inefficient: I 
move one atom and have to perform an SCF cycle (...it will converge faster BUT 
NOT N times faster, where N is the number of atoms in the sample). So, I 
intend to use hybrid MC, which moves all the atom together,  to improve the 
efficiency. This is what I need to do and why I have to combine HMC with 

>From my reading of the code I think I will have to add a new run mode to cater 
for my needs... am I right?


On Thu 23 Jun 2011 23:15:31 Matt McGrath wrote:
> Hi Alin.
> On Jun 23, 7:19 pm, Alin Marin Elena <alinm... at gmail.com> wrote:
> > Hi Matt,
> > 
> > Thank you very much for you fast and detailed answer.
> > I read the HMC part from the paper that you suggested, thank you, it
> > made some things clearer on what is implemented in cp2k...
> > 
> > > Good question.  HMC is something I've just recently implemented.
> > >  I've
> > > tested it to make sure it samples correctly, but I've noticed too
> > > that
> > > it's not the easiest to use, unless you happen to be the person who
> > > wrote the MC routines (and even then, new issues pop up sometimes).
> > 
> > they are not so bad... I just want to be sure that I do not miss things
> > that can bite me later.
> > 
> > Is there any pilot study you can point me to for the 0.7 acceptance rate
> > for the HMC? I know that the MC schemes efficiency tends to be
> > connected with the acceptance rate.
> Unfortunately, I can't find any studies that say that.  It just seems
> to be what is currently used in the literature.  You're right,
> acceptance ratio really impacts your sampling.  The conventional
> wisdom in the field is to aim for 50% for moves involving the
> Metropolis acceptance ratio, 50% for volume moves (though 30-40 is
> good for equilibration), and various guidelines for other move types,
> although even these are not set in stone (I've seen arguments for
> lower acceptance ratios in translations/rotations, for example, even
> as low as 25%).  In the end, all you can do is monitor your system and
> see when it's equilibrated (according to density, energy, or
> whatever).  On the plus side, a bad acceptance ratio doesn't lead to
> the wrong answer...it just might make you get there slower.
> > What I want to sample is indeed a canonical ensemble. The MD part will
> > be DFT, so now you may understand my worry on efficiency.
> > My system is simple, 23 atoms I do not care about the molecules, so I
> > created a topology file that puts all of them in one "macro-molecule".
> > I attached my input files, so any feedback is much appreciated...
> I took a look at your input file, and I can't see any obvious
> problems.  I am, however, not the ideal person to comment on the DFT
> parameters (I generally rely on other smart people for that :) ).  I
> have had it recommended to me to use FULL_ALL as the preconditioner
> and PS 3 to speed up the MD part, although the first calculation in
> any sequence is always going to take more time if the HMC move was
> rejected.
> > Now what I try to do... I try to use a metadynamics run with CV and
> > forces coming from DFT.
> > The acceptance hamiltonian is the one coming from the all system
> > (atoms+CVs) but the trajectories for MD are evolved using only the
> > physical forces.
> > 
> > I was wondering if that is possible to do it in the current state of
> > cp2k or should I define my own type of dynamics?
> I'm not seeing how that could work at the moment, theoretically or
> practically.  It would take some time for me to understand
> metadynamics (coincidentally, I am just starting a metadynamics
> project), so I'm guessing that it's nothing that will happen soon
> (bigger priority is to clean up the MC routines).  Is there a big
> reason why you want to do this over regular MD with meta?  I'm not
> seeing the advantage, honestly, and I don't see how you would include
> metadynamics when your MD run is just a regular NVE (if I'm
> understanding you correctly).
>                            Cheers, Matt
> > regards,
> > Alin
> > --
> >  Without Questions there are no Answers!
> >  _____________________________________________________________________
> >   Alin Marin ELENA
> >   Advanced Molecular Simulation Research Laboratory
> >   School of Physics, University College Dublin
> >   ----
> >   Ardionsamblú Móilíneach Saotharlann Taighde
> >   Scoil na Fisice, An Coláiste Ollscoile, Baile Átha Cliath
> > 
> >  
> > -----------------------------------------------------------------------
> > ---- -------- http://alin.elenaworld.net
> >   ______________________________________________________________________
> > 
> >  hmc.tar.bz2
> > 319KViewDownload
> > 
> >  signature.asc
> > < 1KViewDownload
 Without Questions there are no Answers!
  Alin Marin ELENA
  Advanced Molecular Simulation Research Laboratory
  School of Physics, University College Dublin
  Ardionsamblú Móilíneach Saotharlann Taighde
  Scoil na Fisice, An Coláiste Ollscoile, Baile Átha Cliath

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20110628/c54d6af0/attachment.htm>
-------------- next part --------------

More information about the CP2K-user mailing list