Hi Geo, since you didn’t mention whether standard/unpatched GROMACS 2020 builds correctly, I checked myself, and in fact with GCC 11.2 (Fedora 35) I get the following.
In file included from /home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.cpp:44:
/home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.h:269:31: error: ‘numeric_limits’ is not a member of ‘std’
269 | Step lastStep_ = std::numeric_limits<Step>::max();
| ^~~~~~~~~~~~~~
/home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.h:269:50: error: expected primary-expression before ‘>’ token
269 | Step lastStep_ = std::numeric_limits<Step>::max();
| ^
/home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.h:269:53: error: ‘::max’ has not been declared; did you mean ‘std::max’?
269 | Step lastStep_ = std::numeric_limits<Step>::max();
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/fioring2/sources/gromacs/2020.6/src/gromacs/math/vectypes.h:42,
from /home/fioring2/sources/gromacs/2020.6/src/gromacs/mdlib/vcm.h:44,
from /home/fioring2/sources/gromacs/2020.6/src/gromacs/mdlib/md_support.h:40,
from /home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.h:46,
from /home/fioring2/sources/gromacs/2020.6/src/gromacs/modularsimulator/modularsimulator.cpp:44:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gmake[2]: *** [src/gromacs/modularsimulator/CMakeFiles/modularsimulator.dir/build.make:188: src/gromacs/modularsimulator/CMakeFiles/modularsimulator.dir/modularsimulator.cpp.o] Error 1
Hi Geo, index files are read internally by a Colvars internal function. We have discussed that for the case of GROMACS it would be simpler all around to just read directly the index groups that GROMACS itself has defined in memory, but this is not available yet:
Was the index file that you are providing produced with “gmx make_ndx”? Or if it isn’t, can you check that at least GROMACS can read it when you pass it as input to the same command?
If GROMACS can read it but Colvars cannot, can you put it online somewhere and paste a public link? (It is likely too big to paste in the message itself and the format will also change)
With respecto to IndexFile I’ve create it with write_export from MDAnalysis, and check if it is same that these create with make_ndx tool is same for me (not know if I’m missing anything)
With respect to gcc 11 I’ve same error and should apply it suggest for you!.
Well, I can read from Colvars an index file generated by MDAnalysis without problems, so that rules out an issue with MDA. You also mentioned that you can read the same index file with GROMACS.
Does the group name contain spaces by any chance? That looks like the only way that the Colvars parser could be throwing the message “Error: in parsing index file”
Hi, Colvars uses the same units as the MD engine, in this case GROMACS. If you’re adapting a configuration file from NAMD, you should convert force constants and positions/distances accordingly. XYZ files are assumed to be in Å for consistency with what VMD expects.
I want to compile gromacs 2020.6 with colvar, but I only have the code for 2020.5 available, so can I copy the colvar folder from 2020.5 to the same path in the 2020.6 folder?
Or do I need to do something else so that the compilation is correct?
Hi Geo, thanks for pointing that out. I just updated the patching mechanism so that 2020.6 is the original GROMACS release used for reference.
For the record, you can’t just copy over the colvars folder because there are also some small edits to the GROMACS files to integrate Colvars in the workflow. You should re-run the patching procedure described in the Colvars README, or alternatively use a Git branch instead of a specific release tag.
For example, bugfix and small updates to the standard 2020 release are available here before they get included in a minor release (next one being 2020.7):
and this is the corresponding branch with the Colvars patch:
I don’t understand the question completely. You can download the patched 2020.6 release here:
Patching by yourself the standard GROMACS release also works, but it takes more work and it is sensitive to future changes. The GROMACS files used in the interface also happen to be heavily revised between different standard GROMACS versions. Unless you are following the GitHub conversation, it’s just easier to use a pre-patched release.
Prof. Giacomo I’ve found into collars web https://github.com/Colvars/colvars 2020.6 version , I’ve and question can use it same to patch too with plumed?, them can I’ve un gromacs version with plumed and collars same time (plumed support to patch with 2020.6 version)