Regarding the issue of using the Colvars module

Dear LAMMPS users,
I am a beginner using the Colvars package and encountered a problem that I am unable to solve while testing my learning progress on Colvars. I tried to simulate the free energy between 10 atoms in a 30A cube, but after running LAMMPS, the following error occurred: Error: keyword “forcenopbc” is not supported, or not recognized in this context. I have checked the Colvars manual but still cannot find a solution. The Colvars file is as follows


colvars.file (414 Bytes)
Thank you for your help!

@giacomo.fiorin ?

@youkuenheng Please always report your LAMMPS version and platform. Since this is a colvars issue, please also report the colvars version.

The LAMMPS version is the Linux version released in August 2023, and the Colvars package is the latest version. Thank you for reminding me. I will upgrade LAMMPS to the latest version and give it a try.

Hi @youkuenheng! Please move forceNoPBC yes inside the distance { ... } block, since that is a parameter of the distance function.
https://colvars.github.io/lammps-stable_29Aug2024/colvars-refman-lammps.html#sec:cvc_distance
(Collective variables may be defined based on multiple functions, and you may want to specify forceNoPBC only for some of them, not all: hence the location of the keyword.)

I’m adding an example to future versions of the manual to help clarify.

Thanks
Giacomo

Thank you for your help, this issue has been resolved!If I want to find some colvars files written by others for imitation and learning, where should I go?

1 Like

Hi @youkuenheng there are a few simple examples both embedded and linked in the Colvars doc, both as isolated input files and as full input decks. Some of the latter are specific to other packages (e.g. NAMD) but the Colvars syntax is quite similar.

For the purpose of getting more quickly to a working configuration I invite you to check out the Colvars Dashboard, a VMD GUI that comes with existing templates to fill.

Giacomo

Hi @giacomo.fiorin Thank you for taking the time to provide a detailed answer. I will carefully read the GitHub link you provided.
youkuenheng