Bug #227

editconf/genbox problem

Added by Matt Danielson about 12 years ago. Updated about 12 years ago.

Erik Lindahl
Target version:
Affected version - extra info:
Affected version:


Created an attachment (id=297)
Tar file with my input pdb and .top files

I have recently upgraded from Gromacs3.3 to Gromacs4.0 and I seem to be
encountering a problem when trying to solvate a protein in a water box.

Editconf command:
editconf -bt octahedron -f prot2.pdb -o prot2_test.pdb -c -d 1.0

The output from editconf appears to be normal and the problem doesn't
arise until i issue the genbox command:
genbox -cp prot2_test.pdb -cs spc216.gro -o prot_4ion.pdb -p

Error message that follows:
Program genbox, VERSION 4.0
Source code file: gmx_genbox.c, line: 744

Fatal error:
Undefined solute box.
Create one with editconf or give explicit box command line option

On another machine running version 3.3 i have issued the same commands and
there is no error message. When examining the difference between the
prot2_test.pdb files, version 4.0 seems to be leaving out the line
containing coordinate information about the water box.

Line missing @ the top of the prot2_test.pdb in version 4.0:
CRYST1 96.102 96.102 96.102 70.53 109.47 70.53 P 1 1

Another note:
When using version 4.0 if i output .gro files instead of .pdb files, i do not get this error message.
Works fine:
editconf -bt octahedron -f prot2.pdb -o prot2_test.gro -c -d 1.0
genbox -cp prot2_test.gro -cs spc216.gro -o prot_4ion.gro -p

editconf_genbox.tar.gz (452 KB) editconf_genbox.tar.gz Tar file with my input pdb and .top files Matt Danielson, 10/14/2008 08:35 PM


#1 Updated by Peter Kasson about 12 years ago

I have encountered this bug also--if the input PDB for editconf has no CRYST1 line, the version 4.0 editconf will not print a CRYST1 line even if -box is specified. If there is a CRYST1 line present in the input, it will modify and print the CRYST1 line appropriately in the output. I'm having a bit of trouble tracking this one down, but I think it's related to the ePBC changes.

#2 Updated by Berk Hess about 12 years ago

I think I have fixed it.
I have committed the fix both for the head tree and 4.0 branch.
It is around line 749 of gmx_editconf.c, where ePBC should be set:

if (bSetSize || bDist || (btype[0][0]=='t' && bSetAng)) {
ePBC = epbcXYZ;

Can you confirm that adding this line fixes your problem?


#3 Updated by Peter Kasson about 12 years ago

Thanks, Berk. CVS-updating release-4-0-patches to include this line fixes the behavior.

#4 Updated by Berk Hess about 12 years ago

That fixed it then.


Also available in: Atom PDF