Re: Add repulsive potential with dummy atom

From: Giacomo Fiorin (
Date: Tue Mar 16 2021 - 17:01:15 CDT

Hi Geo, the documentation at the Colvars website is a bit richer than what
is included in the NAMD manual:;!!DZ3fjg!qyo_tG5E3pBOtceAeUUlmOgzvZhE-ISTyqmxGzMq3Q7N6md_JUVoSGd9o1sZkrRtJg$
and there are specific examples listed on the top page:;!!DZ3fjg!qyo_tG5E3pBOtceAeUUlmOgzvZhE-ISTyqmxGzMq3Q7N6md_JUVoSGd9o1sQEdszXg$

However, there isn't likely to be an input file that is just ready to be
reused, though, for several reasons:
1. There are details of your system that you didn't describe, but would be
needed to prepare a good input.
2. The version of NAMD that you are using is important, as it affects the
Colvars features available to you. In principle it is possible to build a
more recent version of Colvars with older versions of NAMD, but this is not
supported (meaning, it will likely work but taking more work on your part).
3. The Lennard-Jones potential is not present as a pre-compiled function
for Colvars, although there are provisions to add custom functions at
runtime listed in the Colvars doc.
4. If I understand correctly what Dave also understood, you have many pairs
of molecules, which would mean a lot of variables that aren't really

Without resorting to advanced features/packages, why not simply pick one
atom for each molecule, and apply forces between them with tclBC? It is
slower than C++ code (like e.g. the force field functions from NAMD or the
collective variables from Colvars), but it would be at least parallelized
over nodes, and probably result in small overhead.


On Tue, Mar 16, 2021 at 5:53 PM David Hardy <> wrote:

> Dear Geo,
> That does seem to be a lot of molecules for use with Colvars. That would
> require defining 84 center-of-mass CVs, and then there would be 3486
> pairwise interactions between those centers. I don’t personally have
> expertise with using Colvars, but this seems larger than what might be
> reasonable.
> I’ll leave it to someone with Colvars expertise to further advise you.
> Best regards,
> Dave
> > On Mar 16, 2021, at 4:23 PM, ROPÓN-PALACIOS G. <>
> wrote:
> >
> > Dear David,
> >
> > I have a box with 84 small molecules and not like that they make
> agregation.
> >
> > You can give an example of as make this with colvar please.
> >
> > Best,
> >
> > Geo.
> >
> > Enviado desde mi iPhone
> >
> >> El 16 mar. 2021, a la(s) 1:31 p. m., David Hardy <>
> escribió:
> >>

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