Feature #1929
gmx solvate only updates topology when the solvent is "SOL"
Description
"gmx solvate -p" only updates topology when the solvent is "SOL". It would be nice to add this feature for other solvents as well.
For example, compare that it works for SOL:
touch empty.mdp
{
echo title
echo 0
echo 3 3 3
} > empty.gro
gmx solvate -cp empty.gro -cs spc216.gro -p empty.top -o out.gro
- now empty.top lists the number of SOL added.
However, when I instead try:
gmx solvate -cp empty.gro -cs ./methanol5ns.gro -p empty.top -o out.gro
then the out.gro output is as expected but the lines are not added to the .top file as desired.
Note that the following output from gmx solvate indicates that the necessary information is already known by the program that the molecule is MEOH and 354 such residues were added.
Sorting configuration
Found 1 molecule type:
MEOH ( 6 atoms): 354 residues
Generated solvent containing 2124 atoms in 354 residues
Writing generated configuration to out.gro
Output configuration contains 2124 atoms in 354 residues
Volume : 27 (nm^3)
Density : 741.494 (g/l)
Number of SOL molecules: 0
I have included a charmm methanol .itp and .gro for reproduction, but you don't even need that. Just take share/gromacs/top/spc216.gro and change all "SOL" to some other name and again gmx solvate will fail to update the topology.
Associated revisions
History
#1 Updated by Pedro Lacerda over 3 years ago
- File solvate.patch solvate.patch added
Something like the following non-working patch may do the job. The solvent name is hard-coded in solvate.cpp. Simply get the name from the first molecule in the solvent structure. It works only for a single molecule solvent.
I did not verify but there is a hard-coded distance frequency to put the solvent in the box. If there is a empty region between two solvent molecules because the hard-coded distance is too great, or the program failed to acquire the correct one from solvent structure, the program will results in a defective structure with empty regions between solvent molecules. The scheme to remove overlapping molecules does not apply of course, except if the `defaultDistance` is too low.
#2 Updated by Kevin Boyd over 1 year ago
- Status changed from New to In Progress
- Assignee set to Kevin Boyd
- Target version set to 2018.3
#3 Updated by Gerrit Code Review Bot over 1 year ago
Gerrit received a related patchset '1' for Issue #1929.
Uploader: Kevin Boyd (kevin.boyd@uconn.edu)
Change-Id: gromacs~release-2018~If506e0f509c8a25cb615fb8d3f15b4dfdb239afa
Gerrit URL: https://gerrit.gromacs.org/8125
#4 Updated by Kevin Boyd over 1 year ago
- Status changed from In Progress to Resolved
Applied in changeset 9931becca91d465ef16aa522559f3ed782c20069.
#5 Updated by Paul Bauer over 1 year ago
- Status changed from Resolved to Closed
Fix gmx solvate topology updating
The topology update of gmx solvate was hardcoded to SOL molecules
(and some of the reported quantities also registered HOH and WAT).
Changed to allow updates based on any solvent molecule information.
Also, now allows for updates with multiple solvent molecule types
in the input solvent configuration
Added test case for topology update with multiple solvents
fixes #1929
Change-Id: If506e0f509c8a25cb615fb8d3f15b4dfdb239afa