From: Leonardo Sepulveda Durán (leonardosepulveda_at_gmail.com)
Date: Tue Nov 08 2005 - 18:54:18 CST

Hello!!

I generated a solvated system with packmol, and I would like to
calculate the minimum and maximum coordinates of the box. After
separation of protein and water into diferent files using grep, I use
this tcl script:

package require psfgen
topology /home/gromacs/RPMs/NAMD/toppar/top_all22_prot.inp
segment PROT {
 pdb 520_protein.pdb
}
pdbalias atom ILE CD1 CD
coordpdb 520_protein.pdb PROT
segment WAT {
 auto none
 pdb 520_water.pdb
}
coordpdb 520_water.pdb WAT
writepsf x-plor 520_pack.psf
writepdb 520_pack.pdb
# End of psfgen command
mol load psf 520_pack.psf
mol load pdb 520_pack.pdb
set everyone [atomselect top all]
measure minmax $everyone
measure center $everyone
exit

this is pat of the output

(...)
aliasing residue ILE atom CD1 to CD
reading coordinates from pdb file 498_protein.pdb for segment PROT
building segment WAT
disabling angle autogeneration
disabling dihedral autogeneration
reading residues from pdb file 498_water.pdb
duplicate residue key 100
ERROR: failed on residue TIP3 from pdb file
duplicate residue key 101
ERROR: failed on residue TIP3 from pdb file
duplicate residue key 102
(...)
ERROR: failed on residue TIP3 from pdb file
duplicate residue key 321
ERROR: failed on residue TIP3 from pdb file
duplicate residue key 322
ERROR: failed on residue TIP3 from pdb file
extracted 1222 residues from pdb file
Info: generating structure...
Info: segment complete.
reading coordinates from pdb file 498_water.pdb for segment WAT
Info: writing psf file 498_pack.psf

When I see the .psf file, always it gives me 999 water molecules, no
matter the number in the pdb file.

In the input pdb, the residue numbering reinitiates at the water
segment, Is that the reason of why this error happens? This is a part
of the input file

ATOM 1048 HA1 GLY 83 -5.677 -6.376 -2.695 1.00 0.00 PROT
ATOM 1049 HA2 GLY 83 -7.256 -6.465 -1.897 1.00 0.00 PROT
ATOM 1050 C GLY 83 -5.610 -6.964 -0.663 1.00 0.00 PROT
ATOM 1051 OT1 GLY 83 -5.146 -6.336 0.325 1.00 0.00 PROT
ATOM 1052 OT2 GLY 83 -5.594 -8.219 -0.771 1.00 0.00 PROT
ATOM 1053 OH2 TIP3 1 -25.358 -27.520 -18.838 1.00 1.00 WAT
ATOM 1054 H1 TIP3 1 -25.357 -27.337 -17.898 1.00 1.00 WAT
ATOM 1055 H2 TIP3 1 -25.358 -26.658 -19.252 1.00 1.00 WAT
ATOM 1056 OH2 TIP3 2 -25.358 -26.570 -13.284 1.00 1.00 WAT
ATOM 1057 H1 TIP3 2 -25.358 -27.524 -13.372 1.00 1.00 WAT
ATOM 1058 H2 TIP3 2 -25.353 -26.417 -12.339 1.00 1.00 WAT

Thanks

Leonardo