********>Master Bugfix File - Amber 8 Bug fixes 1 to 63 Programs: AMBER 8 Description: This is the master bugfix file for Amber 8. It contains all of the bugfixes released to date in a single patch script. Usage: Save this file in your $AMBERHOME directory and then apply this patch file to your amber 8 distribution as follows: cd $AMBERHOME patch -p0 -N -r patch_rejects Bugfix 1: Author: Scott Brozell Date: 03/25/2004 Programs: LEaP Description: tleap and xleap may cause a segmentation fault when saving a prmtop file using a unit containing unbonded hydrogen atoms; the problem occurs when modified GB radii are requested. Fix: apply the following patch to amber8/src/leap/src/leap/unitio.c ------------------------------------------------------------------------------ *** src/leap/src/leap/unitio.c 10 Mar 2004 23:25:00 -0000 7.43 --- src/leap/src/leap/unitio.c 25 Mar 2004 20:20:49 -0000 *************** *** 5177,5202 **** /* make the modifications that hydrogen radii depend upon the atom it is bonded to. iGBparm=1 corresponds to Amber 6, and JACS 122:2489 (2000); ! iGBparm=2 adds the modifcation from Biopolymers 56: 275 (2001) */ ! if( GDefaults.iGBparm == 1 || GDefaults.iGBparm == 2 ){ aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0); ! if( sAtomType(aAtomA)[0] == 'C' || ! sAtomType(aAtomA)[0] == 'c' ) dGBrad = 1.3; ! if( sAtomType(aAtomA)[0] == 'O' || ! sAtomType(aAtomA)[0] == 'o' ) dGBrad = 0.8; ! if( sAtomType(aAtomA)[0] == 'S' || ! sAtomType(aAtomA)[0] == 's' ) dGBrad = 0.8; ! if( (sAtomType(aAtomA)[0] == 'N' || ! sAtomType(aAtomA)[0] == 'n') && ! GDefaults.iGBparm == 2) dGBrad = 1.3; } ! ! if( GDefaults.iGBparm == 6 ){ /* try Alexey's scheme */ ! aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0); ! if( sAtomType(aAtomA)[0] == 'N' || ! sAtomType(aAtomA)[0] == 'n' ) dGBrad = 1.3; } break; --- 5177,5215 ---- /* make the modifications that hydrogen radii depend upon the atom it is bonded to. iGBparm=1 corresponds to Amber 6, and JACS 122:2489 (2000); ! iGBparm=2 adds the modification from Biopolymers 56: 275 (2001) */ ! if( iAtomCoordination(saPAtom->aAtom) > 0 ) { ! /* For multiply bonded Hydrogen atoms use the first ! * bond for determining modified GB radii. ! * WAT contains multiply bonded Hydrogen atoms ! * so do not emit a warning. */ aAtomA = aAtomBondedNeighbor(saPAtom->aAtom, 0); ! if( GDefaults.iGBparm == 1 || GDefaults.iGBparm == 2 ){ ! if( sAtomType(aAtomA)[0] == 'C' || ! sAtomType(aAtomA)[0] == 'c' ) dGBrad = 1.3; ! if( sAtomType(aAtomA)[0] == 'O' || ! sAtomType(aAtomA)[0] == 'o' ) dGBrad = 0.8; ! if( sAtomType(aAtomA)[0] == 'S' || ! sAtomType(aAtomA)[0] == 's' ) dGBrad = 0.8; ! if( (sAtomType(aAtomA)[0] == 'N' || ! sAtomType(aAtomA)[0] == 'n') && ! GDefaults.iGBparm == 2) dGBrad = 1.3; ! } ! else if( GDefaults.iGBparm == 6 ){ ! /* try Alexey's scheme */ ! if( sAtomType(aAtomA)[0] == 'N' || ! sAtomType(aAtomA)[0] == 'n' ) dGBrad = 1.3; ! } } ! else { ! VP0(( "WARNING: Unbonded Hydrogen atom %s in %s.\n" ! " Cannot determine the requested GB radius" ! " for this atom.\n" ! " Writing the unmodified Bondi GB radius.\n", ! saPAtom->aAtom->cHeader.sName, ! saPAtom->aAtom->cHeader.cContainedBy->sName )); } break; ------------------------------------------------------------------------------ Temporary workarounds: use the unmodified Bondi GB radii via the command set default PBradii bondi ------------------------------------------------------------------------------ ********>Bugfix 2: Author: Scott Brozell Date: 04/12/2004 Programs: sander, sander.LES Description: the configure option -scali does not produce MPI executables; the combination of -static and -scali does not work; notification of an undefined SCALI_HOME environment variable could be improved. Fix: apply the following patch to amber8/src/configure ------------------------------------------------------------------------------ *** src/configure 12 Mar 2004 00:19:15 -0000 1.224 --- src/configure 12 Apr 2004 22:19:36 -0000 *************** *** 282,287 **** --- 282,289 ---- scali_root='/opt/scali' if [ -z "$SCALI_HOME" ] ; then if [ -d $scali_root ]; then + echo "Warning: the SCALI_HOME environment variable is not defined !" + SCALI_HOME="$scali_root" echo "Caution: Setting SCALI_HOME to $scali_root (guessed)" else PAR="SCALI" *************** *** 289,296 **** EXAMPLE="/usr/local/scali" par_error fi fi ! if [ ! -d $SCALI_HOME/lib ] ||[ ! -d $SCALI_HOME/include ] then echo " missing dirs"; missingfiles ; fi if [ ! -f $SCALI_HOME/include/mpif.h ] ; then echo " missing include"; missingfiles ; fi --- 291,301 ---- EXAMPLE="/usr/local/scali" par_error fi + else + echo "SCALI_HOME is set to $SCALI_HOME" fi ! ! if [ ! -d $SCALI_HOME/lib ] || [ ! -d $SCALI_HOME/include ] then echo " missing dirs"; missingfiles ; fi if [ ! -f $SCALI_HOME/include/mpif.h ] ; then echo " missing include"; missingfiles ; fi *************** *** 300,308 **** then echo " missing libs"; missingfiles; fi done ! echo " SCALI_HOME is set to $SCALI_HOME" ! loadlib="$loadlib -lm -L$SCALI_HOME/lib -lfmpi -lmpi -lscasci -lscirtl" ! fppflags="-I$SCALI_HOME/include $fppflags" ;; none) # Nothing to do --- 305,321 ---- then echo " missing libs"; missingfiles; fi done ! if [ $static = "yes" ]; then ! # scali/doc/ScaMPI/FAQ item 20 (Version: 1.20 Date: Oct 15th 2001): ! #loadlib="$loadlib -L$SCALI_HOME/lib -lfmpi -lmpi -Wl,-Bdynamic -lpthread -ldl -Wl,-Bstatic" ! # builds but does not execute. ! # Neither does static linking of -lpthread -ldl. ! echo "Error: static linking with SCALI is not supported !" ! exit 1 ! else ! loadlib="$loadlib -L$SCALI_HOME/lib -lfmpi -lmpi" ! fi ! fppflags="-I$SCALI_HOME/include $fppflags -DMPI" ;; none) # Nothing to do ------------------------------------------------------------------------------ Temporary workarounds: use a different MPI implementation. ------------------------------------------------------------------------------ ********>Bugfix 3: Author: Dave Case Date: 04/20/2004 Programs: antechamber Description: pdb files that have a chainID in column 22 of ATOM cards will be read incorrectly. Fix: apply the following patch to amber8/src/antechamber/pdb.c ------------------------------------------------------------------------------ *** src/antechamber/pdb.c 2003/09/16 19:15:19 1.5 --- src/antechamber/pdb.c 2004/04/20 22:08:14 *************** *** 32,41 **** || strncmp("HETATM", line, 6) == 0) if (overflow_flag == 0) { if (pqr) ! sscanf(&line[21], "%d%lf%lf%lf%lf%lf%s", &tmpint2, &x, &y, &z, &tmpfloat1, &tmpfloat2, tmpchar); else ! sscanf(&line[21], "%d%lf%lf%lf", &tmpint2, &x, &y, &z); /* --- columns 13-16 have the Brookhaven-formatted name: */ --- 32,41 ---- || strncmp("HETATM", line, 6) == 0) if (overflow_flag == 0) { if (pqr) ! sscanf(&line[22], "%d%lf%lf%lf%lf%lf%s", &tmpint2, &x, &y, &z, &tmpfloat1, &tmpfloat2, tmpchar); else ! sscanf(&line[22], "%d%lf%lf%lf", &tmpint2, &x, &y, &z); /* --- columns 13-16 have the Brookhaven-formatted name: */ ------------------------------------------------------------------------------ Temporary workaround: Make sure that your input pdb files have a blank in column 22 of any ATOM or HETATM card ------------------------------------------------------------------------------ ********>Bugfix 4: Author: Chenglong Li and Ray Luo Date: 04/20/2004 Programs: pbsa Description: The program can exit with the error message "PB Bomb in epsbnd()"; this should not be an error, and should be treated as a warning instead. Fix: apply the following patch to amber8/src/pbsa/pb_force.f ------------------------------------------------------------------------------ *** src/pbsa/pb_force.f 2004/03/12 08:10:47 1.9 --- src/pbsa/pb_force.f 2004/04/21 01:18:03 *************** *** 3508,3515 **** if ( abs(insas(i,j,k)) == 2 .or. insas(i,j,k) == -1 ) then clstmp = atmsas(i,j,k) if ( clstmp == 0 ) then ! write(6, *) 'PB Bomb in epsbnd(): No neighbor found for exposed boundary grid', i, j, k ! call mexit(6,1) end if ! for a buried reentry grid point, find the atom that marked its neighoring exposed reentry --- 3508,3515 ---- if ( abs(insas(i,j,k)) == 2 .or. insas(i,j,k) == -1 ) then clstmp = atmsas(i,j,k) if ( clstmp == 0 ) then ! ! write(6, *) 'No neighbor found for exposed boundary grid', i, j, k ! nwarn = nwarn + 1 end if ! for a buried reentry grid point, find the atom that marked its neighoring exposed reentry ------------------------------------------------------------------------------ Temporary workaround: none ------------------------------------------------------------------------------ ********>Bugfix 5: Authors: Andres Gomez and Scott Brozell Date: 04/20/2004 Programs: xleap Description: the configure hpf90 and HP-UX compiler/architectures do not produce a functional xleap because the m4 macro processor push-back buffer is too small. Fix: apply the following patch to amber8/src/configure ------------------------------------------------------------------------------ *** src/configure 2004/03/12 00:19:15 1.224 --- src/configure 2004/04/20 23:07:11 *************** *** 715,720 **** --- 715,721 ---- freeformat_flag='+source=free' ar='ar rvs ' ranlib=/bin/true + m4='m4 -B50000' loadptraj="$load" ;; ------------------------------------------------------------------------------ Temporary workarounds: use tleap. ------------------------------------------------------------------------------ ********>Bugfix 6: Authors: Junmei Wang Date: 04/28/2004 Programs: antechamber Description: When the input is a mol2 file ("-fi mol2") antechamber gets confused, and will give wrong atom types and charges. Other fixups allow cm2 charges to be obtained, and to do some additional error checking, and better identification of aromatic rings Fix: copy this file to "$AMBERHOME/src/antechamber/patchfile". Then: cd $AMBERHOME/src/antechamber patch -p0 < patchfile ------------------------------------------------------------------------------ diff -c -r1.4 am1bcc.c *** src/antechamber/am1bcc.c 2004/02/02 21:46:47 1.4 --- src/antechamber/am1bcc.c 2004/04/28 23:11:49 *************** *** 44,49 **** --- 44,50 ---- char *system_env; char line[MAXCHAR]; int i, j, k, l; + int intstatus =1; double bccparm[MAX_BCCATOMTYPENUM][MAX_BCCATOMTYPENUM][MAX_BCCBONDTYPENUM]; double totalcharge = 0.0; *************** *** 143,148 **** --- 144,150 ---- " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" + " -s status information, can be 0 (brief), 1 (the default) and 2 (verbose)\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" *************** *** 152,163 **** " 5: Atom and partial bond type\n"); exit(0); } ! if (argc != 7 && argc != 9 && argc != 11) { printf ("Usage: am1bcc -i input file name in ac format \n" " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" --- 154,166 ---- " 5: Atom and partial bond type\n"); exit(0); } ! if (argc != 7 && argc != 9 && argc != 11 &argc != 13) { printf ("Usage: am1bcc -i input file name in ac format \n" " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" + " -s status information, can be 0 (brief), 1 (the default) and 2 (verbose)\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" *************** *** 175,180 **** --- 178,184 ---- " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" + " -s status information, can be 0 (brief), 1 (the default) and 2 (verbose)\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" *************** *** 184,194 **** " 5: Atom and partial bond type\n"); exit(0); } ! if (argc != 7 && argc != 9 && argc != 11) { printf("Usage: am1bcc -i input file name in ac format \n" " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" --- 188,199 ---- " 5: Atom and partial bond type\n"); exit(0); } ! if (argc != 7 && argc != 9 && argc != 11 && argc != 13) { printf("Usage: am1bcc -i input file name in ac format \n" " -o output file name \n" " -f output file format(pdb or ac, optional, default is ac)\n" " -p bcc parm file name (optional))\n" + " -s status information, can be 0 (brief), 1 (the default) and 2 (verbose)\n" " -j atom and bond type judge option, default is 0)\n" " 0: No judgement\n" " 1: Atom type\n" *************** *** 209,214 **** --- 214,221 ---- strcpy(ofilename, argv[i + 1]); if (strcmp(argv[i], "-j") == 0) judge_flag = atoi(argv[i + 1]); + if (strcmp(argv[i], "-s") == 0) + intstatus = atoi(argv[i + 1]); if (strcmp(argv[i], "-f") == 0) if (strcmp(argv[i + 1], "PDB") == 0 || strcmp(argv[i + 1], "pdb") == 0) *************** *** 244,284 **** if (judge_flag == 1) { strcat(command_at, ifilename); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } if (judge_flag == 2) { strcat(command_bt, ifilename); strcat(command_bt, " -j full"); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); } if (judge_flag == 3) { strcat(command_bt, ifilename); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); } if (judge_flag == 4) { strcat(command_bt, ifilename); strcat(command_bt, " -j full"); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); strcat(command_at, "ANTECHAMBER_AM1BCC.AC"); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } if (judge_flag == 5) { strcat(command_bt, ifilename); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); strcat(command_at, "ANTECHAMBER_AM1BCC.AC"); ! if (cinfo.intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } --- 251,291 ---- if (judge_flag == 1) { strcat(command_at, ifilename); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } if (judge_flag == 2) { strcat(command_bt, ifilename); strcat(command_bt, " -j full"); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); } if (judge_flag == 3) { strcat(command_bt, ifilename); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); } if (judge_flag == 4) { strcat(command_bt, ifilename); strcat(command_bt, " -j full"); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); strcat(command_at, "ANTECHAMBER_AM1BCC.AC"); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } if (judge_flag == 5) { strcat(command_bt, ifilename); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_bt); system(command_bt); strcat(command_at, "ANTECHAMBER_AM1BCC.AC"); ! if (intstatus == 2) fprintf(stderr, "\nRunning: %s\n", command_at); system(command_at); } =================================================================== *** src/antechamber/antechamber.c 2004/02/02 21:46:47 1.51 --- src/antechamber/antechamber.c 2004/04/28 23:12:00 *************** *** 299,305 **** char tmpchar[MAXCHAR]; char *system_env; ! wac("ANTECHAMBER_BOND_TYPE.AC", atomnum, atom, bondnum, bond, cinfo, minfo); system_env = (char *) getenv("AMBERHOME"); if (system_env != NULL) { --- 299,305 ---- char tmpchar[MAXCHAR]; char *system_env; ! wac("ANTECHAMBER_BOND_TYPE.AC0", atomnum, atom, bondnum, bond, cinfo, minfo); system_env = (char *) getenv("AMBERHOME"); if (system_env != NULL) { *************** *** 310,316 **** strcpy(tmpchar, "bondtype"); strcat(tmpchar, ! " -i ANTECHAMBER_BOND_TYPE.AC -o ANTECHAMBER_BOND_TYPE.AC -f ac -j "); if (bondtype_flag == 1) strcat(tmpchar, "part"); else --- 310,316 ---- strcpy(tmpchar, "bondtype"); strcat(tmpchar, ! " -i ANTECHAMBER_BOND_TYPE.AC0 -o ANTECHAMBER_BOND_TYPE.AC -f ac -j "); if (bondtype_flag == 1) strcat(tmpchar, "part"); else *************** *** 922,928 **** judgebondtype(atomnum, atom, bondnum, bond, cinfo, minfo, bondtype_flag); if(cinfo.prediction_index ==2||cinfo.prediction_index ==3) cinfo.prediction_index = 0; ! if(cinfo.prediction_index ==3||cinfo.prediction_index ==4) cinfo.prediction_index = 1; } if (duplicatedname_flag) --- 922,928 ---- judgebondtype(atomnum, atom, bondnum, bond, cinfo, minfo, bondtype_flag); if(cinfo.prediction_index ==2||cinfo.prediction_index ==3) cinfo.prediction_index = 0; ! if(cinfo.prediction_index ==4||cinfo.prediction_index ==5) cinfo.prediction_index = 1; } if (duplicatedname_flag) *************** *** 944,954 **** system(tmpchar); rac("ANTECHAMBER_AC.AC", &atomnum, atom, &bondnum, bond, &cinfo, &minfo); - if(strcmp("bcc", cinfo.chargetype) != 0 && strcmp("2", cinfo.chargetype) != 0) { - if(cinfo.prediction_index ==1) cinfo.prediction_index = 0; - if(cinfo.prediction_index ==4) cinfo.prediction_index = 2; - if(cinfo.prediction_index ==5) cinfo.prediction_index = 3; - } } /* the following code readin or calculate charges */ --- 944,949 ---- *************** *** 966,972 **** bcc(ifilename, atomnum, atom, bondnum, bond, arom, &cinfo, &minfo); if (strcmp("cm2", cinfo.chargetype) == 0 || strcmp("3", cinfo.chargetype) == 0) ! cm2(atomnum, atom, cinfo, minfo); if (strcmp("esp", cinfo.chargetype) == 0 || strcmp("4", cinfo.chargetype) == 0) esp(ifilename, atomnum, atom, cinfo, minfo); --- 961,967 ---- bcc(ifilename, atomnum, atom, bondnum, bond, arom, &cinfo, &minfo); if (strcmp("cm2", cinfo.chargetype) == 0 || strcmp("3", cinfo.chargetype) == 0) ! cm2(atomnum, atom, &cinfo, &minfo); if (strcmp("esp", cinfo.chargetype) == 0 || strcmp("4", cinfo.chargetype) == 0) esp(ifilename, atomnum, atom, cinfo, minfo); Index: charge.c =================================================================== RCS file: /thr/gamow/cvsroot/amber8/src/antechamber/charge.c,v retrieving revision 1.8 diff -c -r1.8 charge.c *** src/antechamber/charge.c 2004/02/02 21:44:42 1.8 --- src/antechamber/charge.c 2004/04/28 23:12:10 *************** *** 5,11 **** ! void rmopcharge(char *filename, int atomnum, ATOM atom[], MOLINFO *minfo) { /* now modified for divcon.out output */ --- 5,11 ---- ! void rmopcharge(char *filename, int atomnum, ATOM atom[], MOLINFO *minfo, int flag) { /* now modified for divcon.out output */ *************** *** 24,29 **** --- 24,30 ---- char line[MAXCHAR]; double tmpfloat1; double tmpfloat2; + double tmpfloat3; if ((fpout = fopen(filename, "r")) == NULL) { fprintf(stderr, "Cannot open %s , exit\n", filename); *************** *** 54,62 **** break; } if (index == 2) { ! sscanf(line, "%d%s%lf%lf", &tmpint, tmpchar, &tmpfloat1, ! &tmpfloat2); ! atom[number].charge = tmpfloat1; number++; } } --- 55,68 ---- break; } if (index == 2) { ! sscanf(line, "%d%s%lf%lf%lf", &tmpint, tmpchar, &tmpfloat1, ! &tmpfloat2, &tmpfloat3); ! if(flag == 1) ! atom[number].charge = tmpfloat1; ! if(flag == 2) ! atom[number].charge = tmpfloat2; ! if(flag == 3) ! atom[number].charge = tmpfloat3; number++; } } *************** *** 273,278 **** --- 279,288 ---- strcat(tmpchar1, " -i ANTECHAMBER_AM1BCC_PRE.AC -o ANTECHAMBER_AM1BCC.AC -f ac -p "); strcat(tmpchar1, tmpchar2); + strcat(tmpchar1, " -s "); + newitoa((*cinfo).intstatus, tmpchar2); + strcat(tmpchar1, tmpchar2); + /* if (strcmp((*cinfo).intype, "ac") == 0 || strcmp((*cinfo).intype, "1") == 0 || strcmp((*cinfo).intype, "mol2") == 0 || strcmp((*cinfo).intype, "2") == 0) { *************** *** 283,288 **** --- 293,305 ---- strcat(tmpchar1, tmpchar); } else strcat(tmpchar1, " -j 4"); + */ + if ((*cinfo).prediction_index == -1) + (*cinfo).prediction_index = 0; + newitoa((*cinfo).prediction_index, tmpchar); + strcat(tmpchar1, " -j "); + strcat(tmpchar1, tmpchar); + if ((*cinfo).intstatus == 2) fprintf(stderr, "\nRunning: %s\n", tmpchar1); system(tmpchar1); *************** *** 318,324 **** if (strcmp((*cinfo).intype, "mopout") == 0 || strcmp((*cinfo).intype, "12") == 0) ! rmopcharge(filename, atomnum, atom, minfo); else { wmopcrt("divcon.in", atomnum, atom, *minfo); --- 335,341 ---- if (strcmp((*cinfo).intype, "mopout") == 0 || strcmp((*cinfo).intype, "12") == 0) ! rmopcharge(filename, atomnum, atom, minfo, 1); else { wmopcrt("divcon.in", atomnum, atom, *minfo); *************** *** 332,366 **** if ((*cinfo).intstatus == 2 || (*cinfo).intstatus == 1) fprintf(stderr, "\nRunning: %s\n", tmpchar); system(tmpchar); ! rmopcharge("divcon.out", atomnum, atom, minfo); } bccharge(atomnum, atom, bondnum, bond, arom, cinfo, minfo); } /* CHARGE METHOD : CM2 */ ! void cm2(int atomnum, ATOM atom[], CONTROLINFO cinfo, MOLINFO minfo) { ! char tmpchar[200]; ! char keyword[MAXCHAR]; ! char *system_env; ! strcpy(keyword, minfo.mkeyword); ! strcat(keyword, " CM2 "); ! wmopcrt("ANTECHAMBER_CM2", atomnum, atom, minfo); ! system_env = (char *) getenv("AMBERHOME"); ! if (system_env != NULL) { ! strcpy(tmpchar, system_env); ! strcat(tmpchar, "/exe/"); ! strcat(tmpchar, minfo.mopac_prog); ! } else { ! strcpy(tmpchar, minfo.mopac_prog); ! } ! strcat(tmpchar, " ANTECHAMBER_CM2 ANTECHAMBER_CM2_OUT"); ! if (cinfo.intstatus == 2 || cinfo.intstatus == 1) ! fprintf(stderr, "\nRunning: %s\n", tmpchar); ! ! system(tmpchar); ! rmopcharge("ANTECHAMBER_CM2_OUT", atomnum, atom, &minfo); } /* CHARGE METHOD : Mulliken */ --- 349,376 ---- if ((*cinfo).intstatus == 2 || (*cinfo).intstatus == 1) fprintf(stderr, "\nRunning: %s\n", tmpchar); system(tmpchar); ! rmopcharge("divcon.out", atomnum, atom, minfo, 1); } bccharge(atomnum, atom, bondnum, bond, arom, cinfo, minfo); } /* CHARGE METHOD : CM2 */ ! void cm2(int atomnum, ATOM atom[], CONTROLINFO *cinfo, MOLINFO *minfo) { ! char tmpchar[200]; ! char *system_env; ! wmopcrt("divcon.in", atomnum, atom, *minfo); ! system_env = (char *) getenv("AMBERHOME"); ! if (system_env != NULL) { ! strcpy(tmpchar, system_env); ! strcat(tmpchar, "/exe/divcon"); ! } else ! strcpy(tmpchar, "divcon"); ! if ((*cinfo).intstatus == 2 || (*cinfo).intstatus == 1) ! fprintf(stderr, "\nRunning: %s\n", tmpchar); ! system(tmpchar); ! rmopcharge("divcon.out", atomnum, atom, minfo, 3); } /* CHARGE METHOD : Mulliken */ *************** *** 375,381 **** rgaucharge(filename, "mul", atomnum, atom, minfo); else if (strcmp((*cinfo).intype, "mopout") == 0 || strcmp((*cinfo).intype, "12") == 0) ! rmopcharge(filename, atomnum, atom, minfo); else { wmopcrt("divcon.in", atomnum, atom, *minfo); system_env = (char *) getenv("AMBERHOME"); --- 385,391 ---- rgaucharge(filename, "mul", atomnum, atom, minfo); else if (strcmp((*cinfo).intype, "mopout") == 0 || strcmp((*cinfo).intype, "12") == 0) ! rmopcharge(filename, atomnum, atom, minfo, 1); else { wmopcrt("divcon.in", atomnum, atom, *minfo); system_env = (char *) getenv("AMBERHOME"); *************** *** 388,394 **** if ((*cinfo).intstatus == 2 || (*cinfo).intstatus == 1) fprintf(stderr, "\nRunning: %s\n", tmpchar); system(tmpchar); ! rmopcharge("divcon.out", atomnum, atom, minfo); } } --- 398,404 ---- if ((*cinfo).intstatus == 2 || (*cinfo).intstatus == 1) fprintf(stderr, "\nRunning: %s\n", tmpchar); system(tmpchar); ! rmopcharge("divcon.out", atomnum, atom, minfo, 1); } } =================================================================== *** src/antechamber/ring.c 2003/06/11 05:30:53 1.1 --- src/antechamber/ring.c 2004/04/28 23:12:23 *************** *** 235,244 **** } for (i = 0; i < ringnum; i++) { - /* for pure aliphatic rings*/ tmpint = 0; for (j = 0; j < ring[i].num; j++) tmpint += initarom[ring[i].atomno[j]]; if (tmpint == -2 * ring[i].num) { for (j = 0; j < ring[i].num; j++) arom[ring[i].atomno[j]].ar5++; --- 235,244 ---- } for (i = 0; i < ringnum; i++) { tmpint = 0; for (j = 0; j < ring[i].num; j++) tmpint += initarom[ring[i].atomno[j]]; + /* for pure aliphatic rings*/ if (tmpint == -2 * ring[i].num) { for (j = 0; j < ring[i].num; j++) arom[ring[i].atomno[j]].ar5++; *************** *** 293,302 **** index0 = 0; for (k = 0; k < bondnum; k++) { if (bond[k].bondi == tmpint1 ! && (bond[k].type == 8 || bond[k].type == 2)) index0 = 1; if (bond[k].bondj == tmpint1 ! && (bond[k].type == 8 || bond[k].type == 2)) index0 = 1; } if (index0 == 0) --- 293,302 ---- index0 = 0; for (k = 0; k < bondnum; k++) { if (bond[k].bondi == tmpint1 ! && (bond[k].type == 8 || bond[k].type == 2 || bond[k].type == 10)) index0 = 1; if (bond[k].bondj == tmpint1 ! && (bond[k].type == 8 || bond[k].type == 2 || bond[k].type == 10)) index0 = 1; } if (index0 == 0) =================================================================== *** src/antechamber/bondtype.C 2004/02/26 22:31:28 1.7 --- src/antechamber/bondtype.C 2004/04/28 23:12:34 *************** *** 1154,1159 **** --- 1154,1165 ---- exit(1); } + for(i=0;iBugfix 7: Authors: Viktor Hornak Date: 05/03/2004 Programs: sander Description: The restraintmask or bellymask strings are parsed before the distances are read; hence the options to generate subsets of atoms based on distances will not work. Fix: copy this file to "$AMBERHOME/src/patchfile". Then: cd $AMBERHOME/src patch -p0 < patchfile ------------------------------------------------------------------------------ *** src/sander/findmask.f 2004-01-28 20:34:03.000000000 -0500 --- src/sander.fix/findmask.f 2004-04-26 11:35:20.000000000 -0400 *************** *** 707,713 **** call error1("noneq", "error parsing distance cutoff value") end if ! if (diststr(1:1).eq.'@'.or.diststr(1:1).eq.':') then ! atom based cutoff do i=1,natom if (mask2(i) == 1) then ii = 3*i - 3 --- 707,716 ---- call error1("noneq", "error parsing distance cutoff value") end if ! ! First, find atoms closer than 'dist' (regardless of whether the ! ! selection is atom or residue based and regardless of the distance ! ! operator ('<' or '>') used). ! if (diststr(1:1).eq.'@'.or.diststr(1:1).eq.':') then do i=1,natom if (mask2(i) == 1) then ii = 3*i - 3 *************** *** 716,733 **** r2 = (crd(ii+1)-crd(jj+1))**2 + & (crd(ii+2)-crd(jj+2))**2 + & (crd(ii+3)-crd(jj+3))**2 ! if (op.eq.'<') then ! if (r2 < d2) mask(j) = 1 ! else if (op.eq.'>') then ! if (r2 > d2) mask(j) = 1 ! else ! call error1("noneq","operator is not < or >") ! end if end do ! j end if end do ! i end if ! if (diststr(1:1).eq.':') then ! residue based cutoff ! if at least one atom in a residue is selected (from ! the previous step), select the whole residue --- 719,730 ---- r2 = (crd(ii+1)-crd(jj+1))**2 + & (crd(ii+2)-crd(jj+2))**2 + & (crd(ii+3)-crd(jj+3))**2 ! if (r2 < d2) mask(j) = 1 end do ! j end if end do ! i end if ! if (diststr(1:1).eq.':') then ! residue based cutoff ! if at least one atom in a residue is selected (from ! the previous step), select the whole residue *************** *** 743,748 **** --- 740,762 ---- end do end if + if (op.eq.'<') then + continue ! you're done + else if (op.eq.'>') then + ! Invert the selection: the best way of thinking about it is that + ! if you want atoms/residues further away than 'dist', select + ! atoms/residues that are closer than 'dist' and neg this selection. + do i=1,natom + if (mask(i) == 1) then + mask(i) = 0 + else + mask(i) = 1 + end if + end do ! i + else + call error1("noneq","operator is not < or >") + end if + if (diststr(1:1).ne.'@'.and.diststr(1:1).ne.':') then call error1("noneq", "residue (<:,>:) or atom (<@,>@) " // & "based distance cutoff must be specified") =============================================================================== *** src/sander/getcor.f 2004-03-04 11:39:03.000000000 -0500 --- src/sander.fix/getcor.f 2004-04-26 10:04:00.000000000 -0400 *************** *** 4,12 **** !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !+ [Enter a one-line description of subroutine getcor here] #ifdef QMMM ! subroutine getcor(nr,x,v,f,ntx,box,irest,tt,temp0,nlink) #else ! subroutine getcor(nr,x,v,f,ntx,box,irest,tt,temp0) #endif ! --- reads initial coords, vel, and box for MD. --- 4,12 ---- !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !+ [Enter a one-line description of subroutine getcor here] #ifdef QMMM ! subroutine getcor(nr,x,v,f,ntx,box,irest,tt,temp0,writeflag,nlink) #else ! subroutine getcor(nr,x,v,f,ntx,box,irest,tt,temp0,writeflag) #endif ! --- reads initial coords, vel, and box for MD. *************** *** 18,23 **** --- 18,27 ---- ! EWALD: read a modified form of the coordinate/restart file ! IMPLICIT _REAL_ (A-H,O-Z) + + ! writeflag was introduced to avoid false failures in test.sander + ! after atommask() dependency on getcor() was fixed by calling getcor() + ! twice: once before atommask() calls and second time in its usual place. implicit none # include "files.h" *************** *** 31,37 **** integer lun,nr,ntx,irest _REAL_ x(*),v(*),f(*),box(3),tt,temp0,ltemp0 ! logical form _REAL_ fvar(7),a,b,c,alpha,beta,gamma integer i,ivar,ifld(7),ihol(1) integer natom,nr3,ier --- 35,41 ---- integer lun,nr,ntx,irest _REAL_ x(*),v(*),f(*),box(3),tt,temp0,ltemp0 ! logical form, writeflag _REAL_ fvar(7),a,b,c,alpha,beta,gamma integer i,ivar,ifld(7),ihol(1) integer natom,nr3,ier *************** *** 41,48 **** ltemp0 = 0.0d0 nr3 = 3*nr lun = 9 !FIXME: use lun=-1 for new amopen() ! ! write(6,9108) ! ----- OPEN THE COORDINATE FILE ----- --- 45,52 ---- ltemp0 = 0.0d0 nr3 = 3*nr lun = 9 !FIXME: use lun=-1 for new amopen() ! ! if (writeflag) write(6,9108) ! ----- OPEN THE COORDINATE FILE ----- *************** *** 95,102 **** do i = 1,nr3 v(i) = 0.d0 end do ! write(6,9008) title1 ! write(6,9009) tt close(lun, iostat=ier) return end if --- 99,108 ---- do i = 1,nr3 v(i) = 0.d0 end do ! if (writeflag) then ! write(6,9008) title1 ! write(6,9009) tt ! end if close(lun, iostat=ier) return end if *************** *** 108,115 **** #else read(lun,9028,end=1010) (v(i),i=1,nr3) #endif ! write(6,9008) title1 ! write(6,9009) tt close(lun, iostat=ier) return --- 114,123 ---- #else read(lun,9028,end=1010) (v(i),i=1,nr3) #endif ! if (writeflag) then ! write(6,9008) title1 ! write(6,9009) tt ! end if close(lun, iostat=ier) return =============================================================================== *** src/sander/mdread.f 2004-03-04 11:39:04.000000000 -0500 --- src/sander.fix/mdread.f 2004-04-26 10:29:26.000000000 -0400 *************** *** 1581,1586 **** --- 1581,1599 ---- call rdrest(natom,ntx,ntrx,x(lcrdr)) close(10) + + ! inserted here to fix the bug that coords are not available + ! yet when distance based selection (<,>) is requested + #ifdef QMMM + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0, & + .FALSE.,0) + #else + #ifdef LES + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0les,.FALSE.) + #else + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0,.FALSE.) + #endif + #endif ! VH - tgtmd change: preferably call atommask() instead of rgroup() if (konst) then *************** *** 1673,1678 **** --- 1686,1703 ---- belly = ibelly > 0 ngrp = 0 if(belly) then + ! inserted here to fix the bug that coords are not available + ! yet when distance based selection (<,>) is requested + #ifdef QMMM + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0, & + .FALSE.,0) + #else + #ifdef LES + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0les,.FALSE.) + #else + call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0,.FALSE.) + #endif + #endif write(6,9418) if( len_trim(bellymask) <= 0 ) then call rgroup(natom,natbel,nres,ngrp,ix(i02),ih(m02), & =============================================================================== *** src/sander/sander.f 2004-03-12 17:03:31.000000000 -0500 --- src/sander.fix/sander.f 2004-04-26 10:15:45.000000000 -0400 *************** *** 780,791 **** #ifdef QMMM nlink = 0 call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0, & ! nlink) #else #ifdef LES ! call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0les) #else ! call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0) #endif #endif #ifdef MPI --- 780,791 ---- #ifdef QMMM nlink = 0 call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0, & ! .TRUE.,nlink) #else #ifdef LES ! call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0les,.TRUE.) #else ! call getcor(nr,x(lcrd),x(lvel),x(lforce),ntx,box,irest,t,temp0,.TRUE.) #endif #endif #ifdef MPI ------------------------------------------------------------------------------ Temporary workarounds: don't use the distance features of the mask routines ********>Bugfix 8: Authors: Junmei Wang Date: 05/05/2004 Programs: antechamber Description: When the input is a mol2 file ("-fi mol2") antechamber, and the "-j 5" flag is also set, antechamber can give the wrong atom types or charges. Fix: Apply the following patch to $AMBERHOME/src/antechamber/bondtype.C ------------------------------------------------------------------------------ *** src/antechamber/bondtype.C 2004/04/28 23:30:19 1.8 --- src/antechamber/bondtype.C 2004/05/04 23:21:46 *************** *** 49,54 **** --- 49,55 ---- int *va_best; int *conjatom; int maxaps; + int judge_flag = 0; struct Point { int addr; *************** *** 731,739 **** { int i, j, k; int bondi, bondj; ! int flag, flag1, flag2; int num; int index[6]; for (i = 0; i < bondnum; i++) { bondi = bond[i].bondi; bondj = bond[i].bondj; --- 732,762 ---- { int i, j, k; int bondi, bondj; ! int flag, flag0, flag1, flag2 ; int num; int index[6]; + if (judge_flag == 0) { + for (i = 0; i < bondnum; i++) { + if(bond[i].type != 10) + continue; + bondi = bond[i].bondi; + bondj = bond[i].bondj; + flag0 = 0; + for (j = 0; j < bondnum; j++) { + if(i==j) continue; + if(bond[j].bondi == bondi || bond[j].bondj == bondi || + bond[j].bondi == bondj || bond[j].bondj == bondj) + if(bond[j].type == 2 || bond[j].type == 8) { + flag0 = 1; + break; + } + } + if(flag0 == 0) + bond[i].type = 8; + else + bond[i].type = 7; + } + } for (i = 0; i < bondnum; i++) { bondi = bond[i].bondi; bondj = bond[i].bondj; *************** *** 883,889 **** int tmpint1, tmpint2; int tmp_addr, tmp_penalty, tmp_valence; int flag = 0; - int judge_flag = 0; if (strcmp(COLORTEXT, "YES") == 0 || strcmp(COLORTEXT, "yes") == 0) { if (argc == 2 --- 906,911 ---- ------------------------------------------------------------------------------ Temporary workarounds: use pdb format files as input to antechamber, rather than mol2 files ********>Bugfix 9: Authors: Dave Case (reported by Martin Mucha) Date: 05/24/2004 Programs: sander Description: The "ioutfm = 1" option is supposed to make the coordinate, velocity and energy files binary. But sander only supports formatted energy files, so an error occurs. This patch simply makes the energy set formatted, regardless of the value of ioutfm Fix: Apply the following patch to $AMBERHOME/src/sander/dynlib.f ------------------------------------------------------------------------------ *** src/sander/dynlib.f 2004/02/18 16:28:24 7.69 --- src/sander/dynlib.f 2004/05/24 16:04:07 *************** *** 182,189 **** call amopen(mdvel_unit,mdvel,owrite,'U','W') write(mdvel_unit) title end if ! if (ntwe > 0) then ! call amopen(mden_unit,mden,owrite,'U','W') write(mden_unit) title end if end if ! (ioutfm <= 0) --- 182,189 ---- call amopen(mdvel_unit,mdvel,owrite,'U','W') write(mdvel_unit) title end if ! if (ntwe > 0) then ! mden is always formatted, regardless of ioutfm ! call amopen(mden_unit,mden,owrite,'F','W') write(mden_unit) title end if end if ! (ioutfm <= 0) ------------------------------------------------------------------------------ Temporary workarounds: use the default value of 0 for ioutfm ********>Bugfix 10: Authors: Yong Duan Date: 06/01/2004 Programs: LEaP Description: The leaprc.ff03 file loads the N-terminal and C-terminal libraries from ff94 after loading the ff03 libraries. This has the effect of using the old charges for ACE and NME. To get the correct values, one needs to change the order in which these files are loaded. Fix: Apply the following patch to $AMBERHOME/dat/leap/cmd/leaprc.ff03: ------------------------------------------------------------------------------ *** dat/leap/cmd/leaprc.ff03 2004/03/16 23:34:19 8.1 --- dat/leap/cmd/leaprc.ff03 2004/06/02 00:36:40 *************** *** 88,97 **** frcmod03 = loadamberparams frcmod.ff03 # - # Load amino acid libraries. - # - loadOff all_amino03.lib - # # Load water and ions # loadOff ions94.lib --- 88,93 ---- *************** *** 112,117 **** --- 108,114 ---- # loadOff all_aminoct94.lib loadOff all_aminont94.lib + loadOff all_amino03.lib # # Define the PDB name map for the amino acids and DNA. ------------------------------------------------------------------------------ Temporary workarounds: none ------------------------------------------------------------------------------ ********>Bugfix 11: Author: Scott Brozell (reported by Joanna Trylska) Date: 06/08/2004 Programs: addles, anal, ambpdb, new2oldparm, nmode, pbsa, sander Description: prmtop files with more than 999999 lines are not correctly read because of inconsistent loop limits. The failures are of the form: ERROR: Flag "xxxx" not found in PARM file Fix: Apply the following patch to $AMBERHOME/src/lib/nxtsec.f ------------------------------------------------------------------------------ *** src/lib/nxtsec.f 13 Mar 2004 00:27:01 -0000 7.12 --- src/lib/nxtsec.f 9 Jun 2004 05:36:33 -0000 *************** *** 42,47 **** --- 42,50 ---- c Author: David Pearlman c Date: 09/00 c + c Scott Brozell June 2004 + c Converted loop control to Fortran 90; these changes are g77 compatible. + c c The PARM file has the following format. c c %VERSION VERSION_STAMP = Vxxxx.yyy DATE = mm:dd:yy hh:mm:ss *************** *** 84,107 **** c %FLAG cards and store the lines they appear on. That way, on c subsequent calls we'll know immediately if we should read further c down the file, rewind, or exit with an error (flag not found). ! c ! LOGICAL FIRST ! SAVE NXTLC1,NXTLC2,NXTLC3,FIRST DATA FIRST/.TRUE./ c c MXNXFL is maximum number of %FLAG cards that can be specified c PARAMETER (MXNXFL = 500) ! c ! CHARACTER*(*) FMTOLD,FMT,FLAG ! c CHARACTER*80 NXTFLG CHARACTER*8 PRDAT,PRTIM CHARACTER*255 AA COMMON /NXTLC1/INXTFL(2,MXNXFL),IPRVRR,NUMFLG,IBLOCK COMMON /NXTLC2/RPVER COMMON /NXTLC3/NXTFLG(MXNXFL),PRDAT,PRTIM ! c IOK = 0 IF (FIRST) THEN c --- 87,140 ---- c %FLAG cards and store the lines they appear on. That way, on c subsequent calls we'll know immediately if we should read further c down the file, rewind, or exit with an error (flag not found). ! ! implicit none ! integer IUNIT ! integer IOUT ! integer IONERR ! character*(*) FMTOLD,FMT,FLAG ! integer IOK ! ! integer NNBCHR ! ! logical FIRST ! SAVE FIRST DATA FIRST/.TRUE./ c c MXNXFL is maximum number of %FLAG cards that can be specified c + integer MXNXFL PARAMETER (MXNXFL = 500) ! CHARACTER*80 NXTFLG CHARACTER*8 PRDAT,PRTIM CHARACTER*255 AA + integer IBLOCK + integer INXTFL + integer IPRVRR + integer NUMFLG + real RPVER COMMON /NXTLC1/INXTFL(2,MXNXFL),IPRVRR,NUMFLG,IBLOCK COMMON /NXTLC2/RPVER COMMON /NXTLC3/NXTFLG(MXNXFL),PRDAT,PRTIM ! ! integer I ! integer IPT ! integer IPT2 ! integer IPT3 ! integer IPT4 ! integer IPT5 ! integer IPT6 ! integer IPT7 ! integer IPT8 ! integer IPT9 ! integer IPT10 ! integer LFLAG ! integer IL2US ! integer IFIND ! integer MBLOCK ! integer ILFO ! IOK = 0 IF (FIRST) THEN c *************** *** 115,127 **** c in RPVER. Store the date and time strings as character strings in c PRDAT and PRTIM. c ! DO 10 I = 1,9999999 READ(IUNIT,11,END=20) AA 11 FORMAT(A) ! IF (AA(1:8).NE.'%VERSION') GO TO 10 c IPT = INDEX(AA,'VERSION_STAMP') ! IF (IPT.LE.0) GO TO 10 c IPT2 = NNBCHR(AA,IPT+13,0,0) IF (AA(IPT2:IPT2).NE.'=') GO TO 9000 --- 148,160 ---- c in RPVER. Store the date and time strings as character strings in c PRDAT and PRTIM. c ! do READ(IUNIT,11,END=20) AA 11 FORMAT(A) ! IF (AA(1:8).NE.'%VERSION') cycle c IPT = INDEX(AA,'VERSION_STAMP') ! IF (IPT.LE.0) cycle c IPT2 = NNBCHR(AA,IPT+13,0,0) IF (AA(IPT2:IPT2).NE.'=') GO TO 9000 *************** *** 155,161 **** * '| Version = ',F8.3,' Date = ',A,' Time = ',A) IPRVRR = 0 GO TO 50 ! 10 CONTINUE c c Get here if no VERSION flag read. Set IPRVRR = 1 and return. c On subsequent calls, if IPRVRR = 1, we return immediately. --- 188,194 ---- * '| Version = ',F8.3,' Date = ',A,' Time = ',A) IPRVRR = 0 GO TO 50 ! end do c c Get here if no VERSION flag read. Set IPRVRR = 1 and return. c On subsequent calls, if IPRVRR = 1, we return immediately. *************** *** 176,182 **** c 50 REWIND(IUNIT) NUMFLG = 0 ! DO I = 1,999999 READ(IUNIT,11,END=99) AA IF (AA(1:5).EQ.'%FLAG') THEN NUMFLG = NUMFLG + 1 --- 209,216 ---- c 50 REWIND(IUNIT) NUMFLG = 0 ! I = 1 ! do READ(IUNIT,11,END=99) AA IF (AA(1:5).EQ.'%FLAG') THEN NUMFLG = NUMFLG + 1 *************** *** 188,194 **** INXTFL(2,NUMFLG) = IPT3-IPT2+1 NXTFLG(NUMFLG) = AA(IPT2:IPT3) END IF ! END DO 99 REWIND(IUNIT) IBLOCK = 0 FIRST = .FALSE. --- 222,229 ---- INXTFL(2,NUMFLG) = IPT3-IPT2+1 NXTFLG(NUMFLG) = AA(IPT2:IPT3) END IF ! I = I + 1 ! end do 99 REWIND(IUNIT) IBLOCK = 0 FIRST = .FALSE. *************** *** 237,249 **** 120 IFIND = I MBLOCK = IBLOCK IF (IFIND.GT.IBLOCK) THEN ! DO I = 1,999999 READ(IUNIT,11,END=9008) AA IF (AA(1:5).EQ.'%FLAG') THEN MBLOCK = MBLOCK + 1 ! IF (MBLOCK.EQ.IFIND) GO TO 145 END IF ! END DO ELSE REWIND(IUNIT) DO I = 1,IL2US --- 272,284 ---- 120 IFIND = I MBLOCK = IBLOCK IF (IFIND.GT.IBLOCK) THEN ! do READ(IUNIT,11,END=9008) AA IF (AA(1:5).EQ.'%FLAG') THEN MBLOCK = MBLOCK + 1 ! IF (MBLOCK.EQ.IFIND) exit END IF ! end do ELSE REWIND(IUNIT) DO I = 1,IL2US *************** *** 251,271 **** END DO END IF ! 145 DO I = 1,9999999 READ(IUNIT,11,END=9009) AA ! IF (AA(1:7).EQ.'%FORMAT') GO TO 160 END DO c c First %FORMAT found following appropriate %FLAG. Extract the c format and return. All non-blank characters following %FORMAT c comprise the format string (embedded blanks allowed). c ! 160 IPT2 = NNBCHR(AA,8,0,0) IF (IPT2.EQ.-1) GO TO 9010 DO I = LEN(AA),IPT2,-1 ! IF (AA(I:I).NE.' ') GO TO 170 END DO ! 170 IPT3 = I c c Format string is in IPT2:IPT3. Make sure passed FMT string is large c enought to hold this and then return. --- 286,306 ---- END DO END IF ! DO READ(IUNIT,11,END=9009) AA ! IF (AA(1:7).EQ.'%FORMAT') exit END DO c c First %FORMAT found following appropriate %FLAG. Extract the c format and return. All non-blank characters following %FORMAT c comprise the format string (embedded blanks allowed). c ! IPT2 = NNBCHR(AA,8,0,0) IF (IPT2.EQ.-1) GO TO 9010 DO I = LEN(AA),IPT2,-1 ! IF (AA(I:I).NE.' ') exit END DO ! IPT3 = I c c Format string is in IPT2:IPT3. Make sure passed FMT string is large c enought to hold this and then return. *************** *** 336,362 **** c if no non-blank character found (IOPER = 0) or no blank c character found (IOPER = 1). c ! CHARACTER*(*) AA IBG = IBEG IEN = IEND IF (IBEG.LE.0) IBG = 1 IF (IEND.LE.0) IEN = LEN(AA) c IF (IOPER.EQ.0) THEN ! DO 10 I = IBG,IEN IF (AA(I:I).NE.' ') THEN NNBCHR = I RETURN END IF ! 10 CONTINUE NNBCHR = -1 ELSE IF (IOPER.EQ.1) THEN ! DO 20 I = IBG,IEN IF (AA(I:I).EQ.' ') THEN NNBCHR = I RETURN END IF ! 20 CONTINUE NNBCHR = -1 END IF c --- 371,407 ---- c if no non-blank character found (IOPER = 0) or no blank c character found (IOPER = 1). c ! implicit none ! integer NNBCHR ! character*(*) AA ! integer IBEG ! integer IEND ! integer IOPER ! ! integer I ! integer IBG ! integer IEN ! IBG = IBEG IEN = IEND IF (IBEG.LE.0) IBG = 1 IF (IEND.LE.0) IEN = LEN(AA) c IF (IOPER.EQ.0) THEN ! DO I = IBG,IEN IF (AA(I:I).NE.' ') THEN NNBCHR = I RETURN END IF ! end do NNBCHR = -1 ELSE IF (IOPER.EQ.1) THEN ! do I = IBG,IEN IF (AA(I:I).EQ.' ') THEN NNBCHR = I RETURN END IF ! end do NNBCHR = -1 END IF c ------------------------------------------------------------------------------ Temporary workarounds: reformat the prmtop contents to reduce its line count. ********>Bugfix 12: Author: Dave Case (reported by Dat Nguyen) Date: 06/15/2004 Programs: sander Description: When extra points are present, their masses are irrelevant, and are set to zero in the fix_masses() routine in extra_pts.f. However, before this happens, an inverse mass is calculated in rdparm2(). This can lead to a crash for some machines if the input mass is zero. Fix: Apply the following patch to $AMBERHOME/src/sander/rdparm.f ------------------------------------------------------------------------------ *** src/sander/rdparm.f 2004/03/14 06:23:51 8.0 --- src/sander/rdparm.f 2004/06/15 20:47:00 *************** *** 812,818 **** ! -- make inverse in "old" Lwinv area ! x(k) = 1.0d0 / x(k) end do tmass = tmass + x(j) end do --- 812,818 ---- ! -- make inverse in "old" Lwinv area ! if( x(k) /= 0.d0 ) x(k) = 1.0d0 / x(k) end do tmass = tmass + x(j) end do ------------------------------------------------------------------------------ Temporary workarounds: none that make more sense than applying the patch ********>Bugfix 13: Author: Ross Walker, with help from Bing Wang and Dave Case Date: 06/18/2004 Programs: sander.QMMM Description: Several patches are needed to make the QMMM option work correctly, especially for molecular dynamics. These involve glitches in transfering things from the ROAR environment to sander. Fix: save this file to bugfix.13 cd $AMBERHOME patch -N -p0 -r rejects < bugfix.13 ------------------------------------------------------------------------------ *** src/sander/dynlib.f 2004/06/18 15:51:52 7.70 --- src/sander/dynlib.f 2004/06/18 16:01:09 *************** *** 316,322 **** --- 316,327 ---- else write(6,9059) eel,ehbond,econst end if + #ifdef QMMM + !write the SCF energy + write(6,9080) esurf + #else if (gbsa > 0) write(6,9077) esurf + #endif if (econst /= 0.0) write(6,9076) epot-econst if ( dvdl /= 0.d0) write(6,9089) dvdl #ifndef LES *************** *** 367,373 **** --- 372,383 ---- else write(7,9059) eel,ehbond,econst end if + #ifdef QMMM + !write the SCF energy + write(7,9080) esurf + #else if (gbsa > 0) write(7,9077) esurf + #endif if (econst /= 0.0) write(7,9076) epot-econst if ( dvdl /= 0.d0) write(7,9089) dvdl #ifndef LES *************** *** 411,416 **** --- 421,427 ---- 9078 format (1x,'EKCMT = ',f14.4,2x,'VIRIAL = ',f14.4,2x, & 'VOLUME = ',f14.4) 9079 format (52x,'Density = ',f14.4) + 9080 format (1x,'ESCF = ',f14.4) #ifdef LES ! LES and non-LES temperatures (no solvent/solute) *** src/sander/link_atoms.f 2003/12/31 21:19:23 7.5 --- src/sander/link_atoms.f 2004/06/18 16:01:51 *************** *** 1,5 **** subroutine link_atoms(nbonds,x,nlink,npert,ib,jb, & ! qmlink,nquant,labels,natoms,winv,numbon,mmqmbo, & igrp) ! implicit double precision (a-h,o-z) --- 1,5 ---- subroutine link_atoms(nbonds,x,nlink,npert,ib,jb, & ! qmlink,nquant,labels,natoms,winv,amass,numbon,mmqmbo, & igrp) ! implicit double precision (a-h,o-z) *************** *** 9,15 **** ! common/parms/rk(5000),req(5000),tk(900),teq(900),pk(900),pn(900), ! + phase(900),cn1(1830),cn2(1830),solty(60), ! + gamc(900),gams(900),ipn(900),fmn(900) ! dimension x(*),ib(*),jb(*),qmlink(*),labels(*),winv(*) dimension mmqmbo(*),igrp(*) ! ! PMF info: --- 9,15 ---- ! common/parms/rk(5000),req(5000),tk(900),teq(900),pk(900),pn(900), ! + phase(900),cn1(1830),cn2(1830),solty(60), ! + gamc(900),gams(900),ipn(900),fmn(900) ! dimension x(*),ib(*),jb(*),qmlink(*),labels(*),winv(*),amass(*) dimension mmqmbo(*),igrp(*) ! ! PMF info: *************** *** 82,91 **** 150 continue nlink = mm end if ! do 200 i=1,nlink ! winv(i) = atinv ! igrp(i) = 1 ! 200 continue ! ! identify those atoms directly bonded to quantum atoms ! --- 82,92 ---- 150 continue nlink = mm end if ! do i=1,nlink ! winv(i) = atinv ! amass(i) = 1.d0/atinv ! igrp(i) = 1 ! end do ! ! identify those atoms directly bonded to quantum atoms ! *** src/sander/locmem.f 2004/03/14 06:07:35 7.116 --- src/sander/locmem.f 2004/06/18 16:02:58 *************** *** 205,211 **** ! --- real array NMR restraints/weight changes: ! call adj_mem_ptr( r_ptr, lmass, natom ) call adj_mem_ptr( r_ptr, lnmr01, irlreq ) call adj_mem_ptr( r_ptr, l75, natom ) --- 205,211 ---- ! --- real array NMR restraints/weight changes: ! call adj_mem_ptr( r_ptr, lmass, natom + ncpp ) call adj_mem_ptr( r_ptr, lnmr01, irlreq ) call adj_mem_ptr( r_ptr, l75, natom ) *************** *** 214,220 **** --- 214,228 ---- else if (nmropt > 0 ) then call adj_mem_ptr( r_ptr, l95, max(natom, 2*ntbond) ) else + #ifdef QMMM + ! QMMM code uses l95 as xwij(3,ln) in resnba. The memory allocated + ! to this used to be much bigger in the amber 4.1 days and so we + ! need to make sure it is big enough for use in the old nonbond + ! list code. + call adj_mem_ptr( r_ptr, l95, max(3*nmxrs*nmxrs,2*ntbond) ) + #else call adj_mem_ptr( r_ptr, l95, 2*ntbond ) + #endif end if if( igb /= 0 ) then call adj_mem_ptr( r_ptr, l96, natom ) *************** *** 323,329 **** call adj_mem_ptr( i_ptr, i02, nres + 1 ) call adj_mem_ptr( i_ptr, i04, natom+ncpp ) call adj_mem_ptr( i_ptr, i06, ntypes*ntypes ) ! call adj_mem_ptr( i_ptr, i08, natom+ncpp ) call adj_mem_ptr( i_ptr, i10, 2*nnb ) iibh = i_ptr --- 331,337 ---- call adj_mem_ptr( i_ptr, i02, nres + 1 ) call adj_mem_ptr( i_ptr, i04, natom+ncpp ) call adj_mem_ptr( i_ptr, i06, ntypes*ntypes ) ! call adj_mem_ptr( i_ptr, i08, natom + ncpp ) call adj_mem_ptr( i_ptr, i10, 2*nnb ) iibh = i_ptr *** src/sander/rdparm.f 2004/06/15 21:08:03 7.75 --- src/sander/rdparm.f 2004/06/18 16:03:39 *************** *** 207,222 **** left = natom - (num*20) kk = 1 mm = 1 if(num.ge.1) then do i=1,num cstrng(:) = ' ' ll = 1 - FMTIN = AFMT - TYPE = 'ATOM_NAME' - CALL NXTSEC(NF, 6, 0,FMTIN, TYPE, FMT, IOK) - do jtemp = 1, i-1 - read(nf,9108) - enddo read(nf,9138)(cstrng(k),k=1,80) call qmcompare(cstrng,itemp,20) do n=1,20 --- 207,219 ---- left = natom - (num*20) kk = 1 mm = 1 + FMTIN = AFMT + TYPE = 'ATOM_NAME' + CALL NXTSEC(NF, 6, 0,FMTIN, TYPE, FMT, IOK) if(num.ge.1) then do i=1,num cstrng(:) = ' ' ll = 1 read(nf,9138)(cstrng(k),k=1,80) call qmcompare(cstrng,itemp,20) do n=1,20 *************** *** 237,259 **** ll = 1 read(nf,9138)(cstrng(k),k=1,80) call qmcompare(cstrng,itemp,left) ! if(left.eq.1) then if(labels(kk).eq.mm) then ! mlabel(kk) = itemp(1) end if ! else ! do n=1,left ! if(labels(kk).eq.mm) then ! mlabel(kk) = itemp(ll) ! mm = mm + 1 ! ll = ll + 1 ! kk = kk + 1 ! else ! mm = mm + 1 ! ll = ll + 1 ! end if ! end do ! end if end if end if #endif --- 234,250 ---- ll = 1 read(nf,9138)(cstrng(k),k=1,80) call qmcompare(cstrng,itemp,left) ! do n=1,left if(labels(kk).eq.mm) then ! mlabel(kk) = itemp(ll) ! mm = mm + 1 ! ll = ll + 1 ! kk = kk + 1 ! else ! mm = mm + 1 ! ll = ll + 1 end if ! end do end if end if #endif *** src/sander/runmd.f 2004-06-18 13:37:28.000000000 -0700 --- src/sander/runmd.f 2004-06-18 13:37:43.000000000 -0700 *************** *** 185,194 **** lout = .true. loutfm = ioutfm <= 0 nr = nrp - nr3 = 3*nr #ifdef QMMM nr = nr + nlink #endif ekmh = 0.d0 #ifdef LES ekmhles = 0.d0 --- 185,194 ---- lout = .true. loutfm = ioutfm <= 0 nr = nrp #ifdef QMMM nr = nr + nlink #endif + nr3 = 3*nr ekmh = 0.d0 #ifdef LES ekmhles = 0.d0 *************** *** 206,212 **** end if #else istart = 1 ! iend = natom #endif istart3 = 3*istart -2 iend3 = 3*iend --- 206,212 ---- end if #else istart = 1 ! iend = nr #endif istart3 = 3*istart -2 iend3 = 3*iend *************** *** 425,430 **** --- 425,436 ---- fiti = 0.d0 fit2 = 0.d0 + #ifdef QMMM + ! Set ntnb=1 to ensure that we always do an initial non-bond list update + ! before doing any MD, even if this is a restart. + ntnb = 1 + #endif + do i = 1,nren ener(i) = 0.0d0 enert(i) = 0.0d0 *************** *** 460,466 **** ! ----- CALCULATE THE CENTER OF MASS ENERGY AND THE COORDINATES ! OF THE SUB-MOLECULES WITH RESPECT TO ITS OWN CENTER OF ! MASS ----- ! call ekcmr(nspm,nsp,tma,ekcmt,xr,v,amass,1,natom) end if ! ----- CALCULATE THE FORCE ----- --- 466,472 ---- ! ----- CALCULATE THE CENTER OF MASS ENERGY AND THE COORDINATES ! OF THE SUB-MOLECULES WITH RESPECT TO ITS OWN CENTER OF ! MASS ----- ! call ekcmr(nspm,nsp,tma,ekcmt,xr,v,amass,1,nr) end if ! ----- CALCULATE THE FORCE ----- *************** *** 477,483 **** iprint = 1 ! TIME_force is started and stopped inside force #ifdef QMMM - if(nstep == 0) ntnb = 1 call forcecp(xx,ix,ih,ipairs,x,f,ener(23),vir, & r_stack, xx(l96), xx(l97), xx(l98), & do_list_update, ifqnt, nquant, & --- 483,488 ---- *************** *** 937,946 **** nstep + 1 #ifdef PSANDER endif ! call setvel(natom,v,winv,temp0*factt,init,iscale,scalm) if (ibelly > 0) call bellyf(nr,ix(ibellygp),v) #else ! call setvel(natom,v,winv,temp0*factt,init,iscale,scalm) #ifdef LES ! newvel call is fixed for the dual target temperatures --- 942,951 ---- nstep + 1 #ifdef PSANDER endif ! call setvel(nr,v,winv,temp0*factt,init,iscale,scalm) if (ibelly > 0) call bellyf(nr,ix(ibellygp),v) #else ! call setvel(nr,v,winv,temp0*factt,init,iscale,scalm) #ifdef LES ! newvel call is fixed for the dual target temperatures *************** *** 1019,1025 **** ! in order. The unused results are thrown away i3 = 3*(istart-1) ! do j=1,natom if( jiend ) then call gauss( 0.d0, 1.d0, fln ) call gauss( 0.d0, 1.d0, fln ) --- 1024,1030 ---- ! in order. The unused results are thrown away i3 = 3*(istart-1) ! do j=1,nr if( jiend ) then call gauss( 0.d0, 1.d0, fln ) call gauss( 0.d0, 1.d0, fln ) *************** *** 1567,1576 **** ! --- now compute the com motion, remove it, and recompute (just ! to check that it is really gone.....) ! call cenmas(natom,f,v,tmass,tmassinv,amass,ekcm, & xcm,vcm,acm,ekrot,ocm,4) ! call stopcm(natom,f,v,xcm,vcm,ocm) ! call cenmas(natom,f,v,tmass,tmassinv,amass,ekcm, & xcm,vcm,acm,ekrot,ocm,4) else --- 1572,1581 ---- ! --- now compute the com motion, remove it, and recompute (just ! to check that it is really gone.....) ! call cenmas(nr,f,v,tmass,tmassinv,amass,ekcm, & xcm,vcm,acm,ekrot,ocm,4) ! call stopcm(nr,f,v,xcm,vcm,ocm) ! call cenmas(nr,f,v,tmass,tmassinv,amass,ekcm, & xcm,vcm,acm,ekrot,ocm,4) else *************** *** 1822,1828 **** if (itdump) then if( iwrap == 0 ) then ! call corpac(x,1,nrx,12,loutfm) if(ntb > 0) call corpac(box,1,3,12,loutfm) else call get_stack(l_temp,3*natom) --- 1827,1833 ---- if (itdump) then if( iwrap == 0 ) then ! call corpac(x,1,3*natom,12,loutfm) if(ntb > 0) call corpac(box,1,3,12,loutfm) else call get_stack(l_temp,3*natom) *************** *** 1835,1841 **** if (ifbox == 2) call wrap_to(nspm,nsp,r_stack(l_temp),box) end if #endif ! call corpac(r_stack(l_temp),1,nrx,12,loutfm) if(ntb > 0) call corpac(box,1,3,12,loutfm) call free_stack(l_temp) end if --- 1840,1846 ---- if (ifbox == 2) call wrap_to(nspm,nsp,r_stack(l_temp),box) end if #endif ! call corpac(r_stack(l_temp),1,3*natom,12,loutfm) if(ntb > 0) call corpac(box,1,3,12,loutfm) call free_stack(l_temp) end if *************** *** 1844,1850 **** ! Velocity archive: if (ntwv > 0) then ! if (mod(nstep,ntwv) == 0) call corpac(v,1,nrx,13,loutfm) end if ! Energy archive: --- 1849,1855 ---- ! Velocity archive: if (ntwv > 0) then ! if (mod(nstep,ntwv) == 0) call corpac(v,1,3*natom,13,loutfm) end if ! Energy archive: *** src/sander/sander.f 2004/05/03 17:49:03 7.206 --- src/sander/sander.f 2004/06/18 16:05:37 *************** *** 912,918 **** klink = nlink call link_atoms(nbona,x(Lcrd),nlink,npert,ix(iiba), & ix(ijba),x(Lcrd+3*natom),nquant, & ! labels,natom,x(Lwinv+natom),mmqmbo(1),mmqmbo(2), & ix(icnstrgp+nr)) if((imin.eq.0).and.(nlink.ne.0).and.(klink.eq.0)) then write(6,*) 'FATAL ERROR' --- 912,918 ---- klink = nlink call link_atoms(nbona,x(Lcrd),nlink,npert,ix(iiba), & ix(ijba),x(Lcrd+3*natom),nquant, & ! labels,natom,x(Lwinv+natom),x(Lmass+natom),mmqmbo(1),mmqmbo(2), & ix(icnstrgp+nr)) if((imin.eq.0).and.(nlink.ne.0).and.(klink.eq.0)) then write(6,*) 'FATAL ERROR' *************** *** 926,943 **** end if if(nbona.gt.0) then ! itemp = nbona ! call del_bond2(nbona,ix(iibh+nbonh),ix(ijbh+nbonh), & ! ix(iicbh+nbonh),ix(iiba),ix(ijba),ix(iicba), & nquant,labels) - idiff = itemp - nbona - nbona = nbona - idiff - - ! adjust memory location pointers to reflect changes in bonding - - Iiba = Iibh + nbonh - Ijba = Ijbh + nbonh - Iicba = Iicbh + nbonh end if ! now that all of the "qm bonds" have been deleted from the bond lists --- 926,933 ---- end if if(nbona.gt.0) then ! call del_bond(nbona,ix(iiba),ix(ijba),ix(iicba), & nquant,labels) end if ! now that all of the "qm bonds" have been deleted from the bond lists *** src/divcon/dcartcl.f 2004/01/15 00:31:12 1.1 --- src/divcon/dcartcl.f 2004/06/18 16:06:21 *************** *** 27,34 **** IMPLICIT DOUBLE PRECISION (A-H,O-Z) #include "divcon.dim" #include "divcon.h" ! ! c#include "sizesqm.h" DIMENSION COORD(3,*), DXYZQM(3,*),crdsmm(*),DXYZMM(3,*), . chrgs(*),iqmres(*),mark(*),jqatms(*) dimension xyz_qm(3),xyz_mm(3),psum(171) --- 27,34 ---- IMPLICIT DOUBLE PRECISION (A-H,O-Z) #include "divcon.dim" #include "divcon.h" ! #include "sizesqm.h" ! DIMENSION COORD(3,*), DXYZQM(3,*),crdsmm(*),DXYZMM(3,*), . chrgs(*),iqmres(*),mark(*),jqatms(*) dimension xyz_qm(3),xyz_mm(3),psum(171) *************** *** 93,99 **** c DEBUG = (INDEX(KEYWRD,'DCART') .NE. 0) c FORCE = (INDEX(KEYWRD,'PREC')+INDEX(KEYWRD,'FORCE') .NE. 0) ENDIF ! do 20 i=1,natoms do 10 j=1,3 dxyzmm(j,i) = 0.0d0 10 continue --- 93,99 ---- c DEBUG = (INDEX(KEYWRD,'DCART') .NE. 0) c FORCE = (INDEX(KEYWRD,'PREC')+INDEX(KEYWRD,'FORCE') .NE. 0) ENDIF ! do 20 i=1,mxatom do 10 j=1,3 dxyzmm(j,i) = 0.0d0 10 continue *** src/divcon/qm_mm.f 2004/01/15 00:31:23 1.1 --- src/divcon/qm_mm.f 2004/06/18 16:08:07 *************** *** 46,52 **** #include "divcon.dim" #include "divcon.h" ! c#include "OLD/SIZES" C character keywrd*241 C --- 46,52 ---- #include "divcon.dim" #include "divcon.h" ! #include "sizesqm.h" C character keywrd*241 C *************** *** 66,73 **** c COMMON /DIPSTO/ UX,UY,UZ,CH(NUMATM) c#include "../sizesqm.h" - parameter (mxatom=20000) - dimension qcords(3,mxatom),jqatms(*),mlabel(*),x(*),chrgs(*) dimension qmlink(*),forces(*) dimension dxyzqm(3,mxatom),dxyzcl(3,mxatom) --- 66,71 ---- *************** *** 151,157 **** $ nquatm,x,chrgs,iread, $ iqmres,mark,jqatms) endif ! call wrttims if (icalcf.eq.0) then call gcart(dxyzqm) if (idc.eq.1) then --- 149,155 ---- $ nquatm,x,chrgs,iread, $ iqmres,mark,jqatms) endif ! c call wrttims if (icalcf.eq.0) then call gcart(dxyzqm) if (idc.eq.1) then *************** *** 167,181 **** call atmchg call wrtchg endif ! write(iout,'(/" ELECTRONIC ENERGY = ",f25.8," EV", ! . /" CORE-CORE REPULSIONS = ",f25.8," EV")') ! . eelect,ecore ! write(iout,'(" TOTAL ENERGY = ",f25.8," EV", ! . /" HEAT OF FORMATION = ",f25.8," KCAL/MOL")') ! . etot,escf ! write(iout,'(" FERMI ENERGY = ",f25.8," EV")') ! . efermi(1) ! call wrtxyz c c calculate electrostatic potential c --- 165,179 ---- call atmchg call wrtchg endif ! c write(iout,'(/" ELECTRONIC ENERGY = ",f25.8," EV", ! c . /" CORE-CORE REPULSIONS = ",f25.8," EV")') ! c . eelect,ecore ! c write(iout,'(" TOTAL ENERGY = ",f25.8," EV", ! c . /" HEAT OF FORMATION = ",f25.8," KCAL/MOL")') ! c . etot,escf ! c write(iout,'(" FERMI ENERGY = ",f25.8," EV")') ! c . efermi(1) ! c call wrtxyz c c calculate electrostatic potential c *************** *** 218,224 **** enddo endif enddo ! else do 300 i=1,nquatm m = jqatms(i) do 320 j=1,3 --- 216,227 ---- enddo endif enddo ! do i=1,ntotatm ! do j=1,3 ! forces((i-1)*3+j) = forces((i-1)*3+j) - dxyzcl(j,i) ! enddo ! enddo ! else do 300 i=1,nquatm m = jqatms(i) do 320 j=1,3 *** src/divcon/rotatecl.f 2004/01/15 00:31:30 1.1 --- src/divcon/rotatecl.f 2004/06/18 16:13:09 *************** *** 106,117 **** write(iout,*) 'Program terminated' stop C ! ELSE IF (ITYPE.EQ.4) THEN C C MINDO CASE C ! write(iout,*) 'MINDO not supported -- program terminated' ! stop C C MNDO, AM1 PM3 CASES C --- 106,117 ---- write(iout,*) 'Program terminated' stop C ! C ELSE IF (ITYPE.EQ.4) THEN C C MINDO CASE C ! C write(iout,*) 'MINDO not supported -- program terminated' ! C stop C C MNDO, AM1 PM3 CASES C *************** *** 212,234 **** SCALE = EXP(-ACI*RIJ)+EXP(-alph_mm*RIJ) ENUC = ZNUCI*chrg_mm*GAM SCALE=ABS(SCALE*ENUC) ! if(igauss.eq.1)then ! c ! c Add on gaussion functions for QM atom. This repulsion term ! c historically has not been used in QM/MM calculations. ! c ! C IF(ITYPE.EQ.2.OR.ITYPE.EQ.3)THEN ! DO 40 IG=1,4 ! C IF(ABS(FN1(NI,IG)).GT.0.0D0)THEN ! AX = BGI(IG)*(RIJ-CGI(IG))**2 ! IF(AX.LE.25.0D0)THEN ! SCALE = SCALE + ! . ZNUCI*chrg_mm/RIJ*AGI(IG)*EXP(-AX) ! ENDIF ! C ENDIF ! 40 CONTINUE ! C ENDIF ! endif ENUC=ENUC+SCALE ENDIF RETURN --- 212,234 ---- SCALE = EXP(-ACI*RIJ)+EXP(-alph_mm*RIJ) ENUC = ZNUCI*chrg_mm*GAM SCALE=ABS(SCALE*ENUC) ! C if(igauss.eq.1)then ! Cc ! Cc Add on gaussion functions for QM atom. This repulsion term ! Cc historically has not been used in QM/MM calculations. ! Cc ! CC IF(ITYPE.EQ.2.OR.ITYPE.EQ.3)THEN ! C DO 40 IG=1,4 ! CC IF(ABS(FN1(NI,IG)).GT.0.0D0)THEN ! C AX = BGI(IG)*(RIJ-CGI(IG))**2 ! C IF(AX.LE.25.0D0)THEN ! C SCALE = SCALE + ! C . ZNUCI*chrg_mm/RIJ*AGI(IG)*EXP(-AX) ! C ENDIF ! CC ENDIF ! C 40 CONTINUE ! CC ENDIF ! C endif ENUC=ENUC+SCALE ENDIF RETURN *** test/qmmm/standard/lysine.out.save 2004/03/11 23:23:47 1.6 --- test/qmmm/standard/lysine.out.save 2004/06/18 16:26:39 *************** *** 3,9 **** Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 01/26/2004 at 01:10:40 [-O]verwriting output File Assignments: --- 3,9 ---- Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 06/18/2004 at 09:21:31 [-O]verwriting output File Assignments: *************** *** 28,34 **** imin =1, maxcyc = 20, drms=0.005, scee=1.2, ntpr=5, ntb=0, cut=99., ifqt=1, nqt= 3, idc=0 ! / 8 9 10 END END --- 28,34 ---- imin =1, maxcyc = 20, drms=0.005, scee=1.2, ntpr=5, ntb=0, cut=99., ifqt=1, nqt= 3, idc=0 ! / 8 9 10 END END *************** *** 50,62 **** | Memory Use Allocated ! | Real 4176 | Hollerith 1635 ! | Integer 22805 | Max Pairs 231 | Max Rstack 50220 | Max Istack 110 ! | Total 521 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals --- 50,62 ---- | Memory Use Allocated ! | Real 5886 | Hollerith 1635 ! | Integer 23449 | Max Pairs 231 | Max Rstack 50220 | Max Istack 110 ! | Total 537 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals *************** *** 116,154 **** NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 1.1240E+00 1.2476E+01 4.8342E+01 C 21 ! BOND = 0.3067 ANGLE = 0.4890 DIHED = 0.0039 ! VDWAALS = 0.2595 EEL = -5.6916 HBOND = 0.0000 ! 1-4 VDW = 3.6343 1-4 EEL = 61.6404 RESTRAINT = 0.0000 ! ESCF = -59.5182 NSTEP ENERGY RMS GMAX NAME NUMBER ! 10 1.2645E+00 2.8947E+01 1.2481E+02 C 21 ! BOND = 0.5395 ANGLE = 0.5698 DIHED = 0.0046 ! VDWAALS = 0.2956 EEL = -5.6340 HBOND = 0.0000 ! 1-4 VDW = 3.6447 1-4 EEL = 61.6286 RESTRAINT = 0.0000 ! ESCF = -59.7843 NSTEP ENERGY RMS GMAX NAME NUMBER ! 15 1.2691E+00 4.6916E+01 2.0912E+02 C 21 ! BOND = 0.5454 ANGLE = 0.5716 DIHED = 0.0046 ! VDWAALS = 0.2965 EEL = -5.6328 HBOND = 0.0000 ! 1-4 VDW = 3.6451 1-4 EEL = 61.6285 RESTRAINT = 0.0000 ! ESCF = -59.7897 NSTEP ENERGY RMS GMAX NAME NUMBER ! 20 1.2681E+00 6.4973E+01 2.9359E+02 C 21 ! BOND = 0.5441 ANGLE = 0.5712 DIHED = 0.0046 ! VDWAALS = 0.2963 EEL = -5.6331 HBOND = 0.0000 ! 1-4 VDW = 3.6450 1-4 EEL = 61.6285 RESTRAINT = 0.0000 ! ESCF = -59.7886 Maximum number of minimization cycles reached. --- 116,154 ---- NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 7.3477E-01 2.4227E+00 7.9326E+00 N 1 ! BOND = 0.0972 ANGLE = 0.4191 DIHED = 0.0039 ! VDWAALS = 0.1497 EEL = -5.7891 HBOND = 0.0000 ! 1-4 VDW = 3.4866 1-4 EEL = 61.5670 RESTRAINT = 0.0000 ! ESCF = -59.1996 NSTEP ENERGY RMS GMAX NAME NUMBER ! 10 -2.1110E-01 9.5830E-01 4.1484E+00 CG 8 ! BOND = 0.2291 ANGLE = 0.9455 DIHED = 0.0151 ! VDWAALS = -0.0998 EEL = -5.6180 HBOND = 0.0000 ! 1-4 VDW = 3.0296 1-4 EEL = 61.2042 RESTRAINT = 0.0000 ! ESCF = -59.9167 NSTEP ENERGY RMS GMAX NAME NUMBER ! 15 -4.2612E-01 1.0603E+00 3.3223E+00 C 21 ! BOND = 0.3464 ANGLE = 1.1014 DIHED = 0.0189 ! VDWAALS = -0.1971 EEL = -5.5027 HBOND = 0.0000 ! 1-4 VDW = 2.9251 1-4 EEL = 61.0328 RESTRAINT = 0.0000 ! ESCF = -60.1508 NSTEP ENERGY RMS GMAX NAME NUMBER ! 20 -6.5331E-01 9.8858E-01 2.8940E+00 N 1 ! BOND = 0.4478 ANGLE = 1.4345 DIHED = 0.0264 ! VDWAALS = -0.3677 EEL = -5.2667 HBOND = 0.0000 ! 1-4 VDW = 2.8055 1-4 EEL = 60.6462 RESTRAINT = 0.0000 ! ESCF = -60.3792 Maximum number of minimization cycles reached. *************** *** 159,190 **** NSTEP ENERGY RMS GMAX NAME NUMBER ! 20 1.2681E+00 6.4973E+01 2.9359E+02 C 21 ! BOND = 0.5441 ANGLE = 0.5712 DIHED = 0.0046 ! VDWAALS = 0.2963 EEL = -5.6331 HBOND = 0.0000 ! 1-4 VDW = 3.6450 1-4 EEL = 61.6285 RESTRAINT = 0.0000 ! ESCF = -59.7886 -------------------------------------------------------------------------------- 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.00 ( 0.54% of Total) ! | Fast Water setup 0.00 ( 0.18% of Total) ! | Nonbond force 0.00 ( 9.96% of Force) ! | QMMM energy 0.04 (84.85% of Force) ! | Bond/Angle/Dihedral 0.00 ( 4.76% of Force) ! | Other 0.00 ( 0.43% of Force) ! | Force time 0.05 (100.0% of Runmd) ! | Runmd Time 0.05 (83.54% of Total) ! | Other 0.01 (15.73% of Total) ! | Total time 0.06 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 01:10:40.034 on 01/26/2004 ! | Setup done at 01:10:40.041 on 01/26/2004 ! | Run done at 01:10:40.089 on 01/26/2004 ! | wallclock() was called 530 times --- 159,188 ---- NSTEP ENERGY RMS GMAX NAME NUMBER ! 20 -6.5331E-01 9.8858E-01 2.8940E+00 N 1 ! BOND = 0.4478 ANGLE = 1.4345 DIHED = 0.0264 ! VDWAALS = -0.3677 EEL = -5.2667 HBOND = 0.0000 ! 1-4 VDW = 2.8055 1-4 EEL = 60.6462 RESTRAINT = 0.0000 ! ESCF = -60.3792 -------------------------------------------------------------------------------- 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.02 ( 1.10% of Total) ! | Nonbond force 0.02 ( 2.08% of Force) ! | QMMM energy 0.93 (96.78% of Force) ! | Bond/Angle/Dihedral 0.01 ( 1.14% of Force) ! | Force time 0.96 (100.0% of Runmd) ! | Runmd Time 0.96 (52.77% of Total) ! | Other 0.84 (46.13% of Total) ! | Total time 1.82 (98.38% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 09:21:30.963 on 06/18/2004 ! | Setup done at 09:21:31.754 on 06/18/2004 ! | Run done at 09:21:32.836 on 06/18/2004 ! | wallclock() was called 588 times *** test/qmmm/divcon/crambin.out.save 2004/03/11 23:23:47 1.6 --- test/qmmm/divcon/crambin.out.save 2004/06/18 16:29:20 *************** *** 3,9 **** Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 03/04/2004 at 01:21:35 [-O]verwriting output File Assignments: --- 3,9 ---- Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 06/18/2004 at 09:27:33 [-O]verwriting output File Assignments: *************** *** 20,34 **** |INPDIP: inpdip |RSTDIP: rstdip ! Here is the input file: ! Crambin: 5 cycles minimization using D&C qm calculation &cntrl imin =1, maxcyc = 5, drms=0.005, scee=1.2, ntpr=1, ntb=0, cut=8.1, ifqt=1, nqt= 80, idc=1, ! / 80 81 82 83 84 85 86 87 88 89 90 91 92 99 100 101 102 103 104 105 106 107 108 115 116 117 118 --- 20,34 ---- |INPDIP: inpdip |RSTDIP: rstdip ! Here is the input file: ! Crambin: 5 cycles minimization using D&C qm calculation &cntrl imin =1, maxcyc = 5, drms=0.005, scee=1.2, ntpr=1, ntb=0, cut=8.1, ifqt=1, nqt= 80, idc=1, ! / 80 81 82 83 84 85 86 87 88 89 90 91 92 99 100 101 102 103 104 105 106 107 108 115 116 117 118 *************** *** 60,72 **** | Memory Use Allocated ! | Real 25280 | Hollerith 5400 | Integer 55343 | Max Pairs 205761 | Max Rstack 56420 | Max Istack 3210 ! | Total 1691 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals --- 60,72 ---- | Memory Use Allocated ! | Real 26010 | Hollerith 5400 | Integer 55343 | Max Pairs 205761 | Max Rstack 56420 | Max Istack 3210 ! | Total 1697 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals *************** *** 117,164 **** NSTEP ENERGY RMS GMAX NAME NUMBER ! 1 1.6067E+03 2.6375E+02 4.2280E+03 SG 373 ! BOND = 51.8279 ANGLE = 71.9091 DIHED = 175.6588 VDWAALS = 2106.9976 EEL = -3217.8815 HBOND = 0.0000 1-4 VDW = 179.4333 1-4 EEL = 2334.7305 RESTRAINT = 0.0000 ESCF = -95.9452 NSTEP ENERGY RMS GMAX NAME NUMBER ! 2 1.5493E+03 2.5693E+02 4.1174E+03 SG 373 ! BOND = 51.7529 ANGLE = 71.8969 DIHED = 175.6565 ! VDWAALS = 2049.6784 EEL = -3217.8951 HBOND = 0.0000 ! 1-4 VDW = 179.4366 1-4 EEL = 2334.7293 RESTRAINT = 0.0000 ! ESCF = -96.0023 NSTEP ENERGY RMS GMAX NAME NUMBER ! 3 1.4822E+03 2.4899E+02 3.9889E+03 SG 373 ! BOND = 51.6618 ANGLE = 71.8833 DIHED = 175.6537 ! VDWAALS = 1982.8540 EEL = -3217.9113 HBOND = 0.0000 ! 1-4 VDW = 179.4406 1-4 EEL = 2334.7276 RESTRAINT = 0.0000 ! ESCF = -96.0725 NSTEP ENERGY RMS GMAX NAME NUMBER ! 4 1.4045E+03 2.3982E+02 3.8403E+03 SG 373 ! BOND = 51.5509 ANGLE = 71.8685 DIHED = 175.6504 ! VDWAALS = 1905.3900 EEL = -3217.9309 HBOND = 0.0000 ! 1-4 VDW = 179.4452 1-4 EEL = 2334.7254 RESTRAINT = 0.0000 ! ESCF = -96.1592 NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 1.3151E+03 2.2929E+02 3.6700E+03 SG 227 ! BOND = 51.4155 ANGLE = 71.8529 DIHED = 175.6464 ! VDWAALS = 1816.2003 EEL = -3217.9544 HBOND = 0.0000 ! 1-4 VDW = 179.4506 1-4 EEL = 2334.7224 RESTRAINT = 0.0000 ! ESCF = -96.2667 Maximum number of minimization cycles reached. --- 117,164 ---- NSTEP ENERGY RMS GMAX NAME NUMBER ! 1 1.6080E+03 2.6376E+02 4.2280E+03 SG 373 ! BOND = 53.1269 ANGLE = 71.9091 DIHED = 175.6588 VDWAALS = 2106.9976 EEL = -3217.8815 HBOND = 0.0000 1-4 VDW = 179.4333 1-4 EEL = 2334.7305 RESTRAINT = 0.0000 ESCF = -95.9452 NSTEP ENERGY RMS GMAX NAME NUMBER ! 2 1.5506E+03 2.5693E+02 4.1175E+03 SG 373 ! BOND = 53.0505 ANGLE = 71.8970 DIHED = 175.6564 ! VDWAALS = 2049.6793 EEL = -3217.8943 HBOND = 0.0000 ! 1-4 VDW = 179.4364 1-4 EEL = 2334.7296 RESTRAINT = 0.0000 ! ESCF = -96.0046 NSTEP ENERGY RMS GMAX NAME NUMBER ! 3 1.4835E+03 2.4900E+02 3.9889E+03 SG 373 ! BOND = 52.9577 ANGLE = 71.8836 DIHED = 175.6537 ! VDWAALS = 1982.8559 EEL = -3217.9096 HBOND = 0.0000 ! 1-4 VDW = 179.4401 1-4 EEL = 2334.7283 RESTRAINT = 0.0000 ! ESCF = -96.0776 NSTEP ENERGY RMS GMAX NAME NUMBER ! 4 1.4058E+03 2.3983E+02 3.8404E+03 SG 373 ! BOND = 52.8446 ANGLE = 71.8690 DIHED = 175.6503 ! VDWAALS = 1905.3932 EEL = -3217.9279 HBOND = 0.0000 ! 1-4 VDW = 179.4444 1-4 EEL = 2334.7265 RESTRAINT = 0.0000 ! ESCF = -96.1677 NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 1.3164E+03 2.2930E+02 3.6700E+03 SG 373 ! BOND = 52.7065 ANGLE = 71.8537 DIHED = 175.6463 ! VDWAALS = 1816.2049 EEL = -3217.9499 HBOND = 0.0000 ! 1-4 VDW = 179.4495 1-4 EEL = 2334.7240 RESTRAINT = 0.0000 ! ESCF = -96.2794 Maximum number of minimization cycles reached. *************** *** 169,199 **** NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 1.3151E+03 2.2929E+02 3.6700E+03 SG 227 ! ! BOND = 51.4155 ANGLE = 71.8529 DIHED = 175.6464 ! VDWAALS = 1816.2003 EEL = -3217.9544 HBOND = 0.0000 ! 1-4 VDW = 179.4506 1-4 EEL = 2334.7224 RESTRAINT = 0.0000 ! ESCF = -96.2667 -------------------------------------------------------------------------------- 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.01 ( 0.07% of Total) ! | Nonbond force 0.04 ( 0.52% of Force) ! | QMMM energy 7.10 (99.33% of Force) ! | Bond/Angle/Dihedral 0.01 ( 0.14% of Force) ! | Other 0.00 ( 0.01% of Force) ! | Force time 7.15 (100.0% of Runmd) ! | Runmd Time 7.15 (98.50% of Total) ! | Other 0.10 ( 1.43% of Total) ! | Total time 7.26 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 01:21:35.039 on 03/04/2004 ! | Setup done at 01:21:35.112 on 03/04/2004 ! | Run done at 01:21:42.298 on 03/04/2004 | wallclock() was called 206 times --- 169,198 ---- NSTEP ENERGY RMS GMAX NAME NUMBER ! 5 1.3164E+03 2.2930E+02 3.6700E+03 SG 373 + BOND = 52.7065 ANGLE = 71.8537 DIHED = 175.6463 + VDWAALS = 1816.2049 EEL = -3217.9499 HBOND = 0.0000 + 1-4 VDW = 179.4495 1-4 EEL = 2334.7240 RESTRAINT = 0.0000 + ESCF = -96.2794 + -------------------------------------------------------------------------------- 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.01 ( 0.08% of Total) ! | Nonbond force 0.10 ( 0.81% of Force) ! | QMMM energy 12.19 (99.11% of Force) ! | Bond/Angle/Dihedral 0.01 ( 0.08% of Force) ! | Force time 12.30 (100.0% of Runmd) ! | Runmd Time 12.30 (98.48% of Total) ! | Other 0.18 ( 1.44% of Total) ! | Total time 12.49 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 09:27:33.845 on 06/18/2004 ! | Setup done at 09:27:34.025 on 06/18/2004 ! | Run done at 09:27:46.333 on 06/18/2004 | wallclock() was called 206 times *** src/sander/Makefile 2004/03/16 00:20:27 8.1 --- src/sander/Makefile 2004/06/17 17:31:04 8.2 *************** *** 136,142 **** threeb.o tripl.o nmrrad.o decnvh.o \ fastwt.o echoin.o parallel.o jnrg.o \ shake.o ene.QMMM.o mdwrit.QMMM.o minrit.QMMM.o \ ! set.o setmm.o dynlib.o mdfil.o nmlsrc.o \ pcshift.o align.o \ rstack.o istack.o rfree.o rgroup.o \ random.o lsqfit.o amopen.o \ --- 136,142 ---- threeb.o tripl.o nmrrad.o decnvh.o \ fastwt.o echoin.o parallel.o jnrg.o \ shake.o ene.QMMM.o mdwrit.QMMM.o minrit.QMMM.o \ ! set.o setmm.o dynlib.QMMM.o mdfil.o nmlsrc.o \ pcshift.o align.o \ rstack.o istack.o rfree.o rgroup.o \ random.o lsqfit.o amopen.o \ *************** *** 502,507 **** --- 502,511 ---- $(FC) -c $(FFLAGS) -o $@ _sander.f # --- routines for sander.QMMM: + + dynlib.QMMM.o: dynlib.f + $(FPP) -DQMMM dynlib.f > _dynlib.f + $(FC) -c $(FFLAGS) -o $@ _dynlib.f printe.QMMM.o: printe.f $(FPP) -DQMMM printe.f > _printe.f *** test/qmmm/divcon/crambin_md.out.save 2004-03-11 16:40:21.000000000 -0800 --- test/qmmm/divcon/crambin_md.out.save 2004-06-18 11:33:31.000000000 -0700 *************** *** 3,9 **** Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 03/02/2004 at 12:12:18 [-O]verwriting output File Assignments: --- 3,9 ---- Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- ! | Run on 06/18/2004 at 11:32:49 [-O]verwriting output File Assignments: *************** *** 28,34 **** imin =0, nstlim=10, scee=1.2, ntpr=1, ntb=0, cut=8.1, ifqt=1, nqt= 80, idc=1, ! / 80 81 82 83 84 85 86 87 88 89 90 91 92 99 100 101 102 103 104 105 106 107 108 115 116 117 118 --- 28,34 ---- imin =0, nstlim=10, scee=1.2, ntpr=1, ntb=0, cut=8.1, ifqt=1, nqt= 80, idc=1, ! / 80 81 82 83 84 85 86 87 88 89 90 91 92 99 100 101 102 103 104 105 106 107 108 115 116 117 118 *************** *** 60,72 **** | Memory Use Allocated ! | Real 17536 | Hollerith 5400 | Integer 55343 | Max Pairs 205761 | Max Rstack 56420 | Max Istack 3210 ! | Total 1631 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals --- 60,72 ---- | Memory Use Allocated ! | Real 18266 | Hollerith 5400 | Integer 55343 | Max Pairs 205761 | Max Rstack 56420 | Max Istack 3210 ! | Total 1637 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals *************** *** 116,228 **** NB-update: NPAIRS = 94449 HBPAIR = 0 NSTEP = 0 TIME(PS) = 0.000 TEMP(K) = 0.00 PRESS = 0.0 ! Etot = -866.9698 EKtot = 0.0000 EPtot = -866.9698 ! BOND = 13.7445 ANGLE = 75.7358 DIHED = 173.5178 1-4 NB = 172.5680 1-4 EEL = 2309.5141 VDWAALS = -271.4044 EELEC = -3215.6062 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 1 TIME(PS) = 0.001 TEMP(K) = 0.00 PRESS = 0.0 ! Etot = -866.9698 EKtot = 0.0000 EPtot = -866.9698 ! BOND = 13.7445 ANGLE = 75.7358 DIHED = 173.5178 1-4 NB = 172.5680 1-4 EEL = 2309.5141 VDWAALS = -271.4044 EELEC = -3215.6062 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 2 TIME(PS) = 0.002 TEMP(K) = 1.67 PRESS = 0.0 ! Etot = -867.1063 EKtot = 3.2241 EPtot = -870.3304 ! BOND = 12.8867 ANGLE = 75.0051 DIHED = 173.4872 ! 1-4 NB = 172.4190 1-4 EEL = 2309.3034 VDWAALS = -271.5678 ! EELEC = -3215.7262 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 3 TIME(PS) = 0.003 TEMP(K) = 5.54 PRESS = 0.0 ! Etot = -867.3391 EKtot = 10.6932 EPtot = -878.0323 ! BOND = 11.1917 ANGLE = 73.0103 DIHED = 173.4018 ! 1-4 NB = 171.9992 1-4 EEL = 2308.6660 VDWAALS = -272.0499 ! EELEC = -3216.0256 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 4 TIME(PS) = 0.004 TEMP(K) = 9.45 PRESS = 0.0 ! Etot = -867.4061 EKtot = 18.2594 EPtot = -885.6655 ! BOND = 10.2671 ANGLE = 70.2827 DIHED = 173.2802 ! 1-4 NB = 171.3814 1-4 EEL = 2307.5924 VDWAALS = -272.8338 ! EELEC = -3216.3475 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 5 TIME(PS) = 0.005 TEMP(K) = 12.54 PRESS = 0.0 ! Etot = -867.1638 EKtot = 24.2249 EPtot = -891.3887 ! BOND = 10.6285 ANGLE = 67.5332 DIHED = 173.1507 ! 1-4 NB = 170.6619 1-4 EEL = 2306.0835 VDWAALS = -273.9011 ! EELEC = -3216.5023 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 6 TIME(PS) = 0.006 TEMP(K) = 15.52 PRESS = 0.0 ! Etot = -866.9821 EKtot = 29.9780 EPtot = -896.9600 ! BOND = 11.2789 ANGLE = 65.4617 DIHED = 173.0481 ! 1-4 NB = 169.9327 1-4 EEL = 2304.1671 VDWAALS = -275.2252 ! EELEC = -3216.3493 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 7 TIME(PS) = 0.007 TEMP(K) = 18.77 PRESS = 0.0 ! Etot = -867.0259 EKtot = 36.2533 EPtot = -903.2792 ! BOND = 11.0953 ANGLE = 64.5874 DIHED = 173.0105 ! 1-4 NB = 169.2576 1-4 EEL = 2301.9111 VDWAALS = -276.7513 ! EELEC = -3215.8623 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 8 TIME(PS) = 0.008 TEMP(K) = 21.30 PRESS = 0.0 ! Etot = -867.0781 EKtot = 41.1380 EPtot = -908.2161 ! BOND = 10.2332 ANGLE = 65.1362 DIHED = 173.0753 ! 1-4 NB = 168.6568 1-4 EEL = 2299.4251 VDWAALS = -278.3904 ! EELEC = -3215.1518 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 9 TIME(PS) = 0.009 TEMP(K) = 22.09 PRESS = 0.0 ! Etot = -866.9373 EKtot = 42.6589 EPtot = -909.5962 ! BOND = 9.8683 ANGLE = 66.9992 DIHED = 173.2749 ! 1-4 NB = 168.1032 1-4 EEL = 2296.8495 VDWAALS = -280.0343 ! EELEC = -3214.4341 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 21.48 PRESS = 0.0 ! Etot = -866.6459 EKtot = 41.4931 EPtot = -908.1390 ! BOND = 10.7214 ANGLE = 69.7649 DIHED = 173.6325 ! 1-4 NB = 167.5306 1-4 EEL = 2294.3332 VDWAALS = -281.5833 ! EELEC = -3213.9580 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ A V E R A G E S O V E R 10 S T E P S ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 12.84 PRESS = 0.0 ! Etot = -867.0655 EKtot = 24.7923 EPtot = -891.8577 ! BOND = 11.1916 ANGLE = 69.3516 DIHED = 173.2879 ! 1-4 NB = 170.2510 1-4 EEL = 2303.7845 VDWAALS = -275.3741 ! EELEC = -3215.5963 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ R M S F L U C T U A T I O N S ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 7.93 PRESS = 0.0 ! Etot = 0.2031 EKtot = 15.3140 EPtot = 15.2196 ! BOND = 1.1606 ANGLE = 3.8933 DIHED = 0.2057 ! 1-4 NB = 1.7383 1-4 EEL = 5.1670 VDWAALS = 3.4815 ! EELEC = 0.8035 EHBOND = 0.0000 RESTRAINT = 0.0000 ! |E(PBS) = 0.2608 ------------------------------------------------------------------------------ --- 116,241 ---- NB-update: NPAIRS = 94449 HBPAIR = 0 NSTEP = 0 TIME(PS) = 0.000 TEMP(K) = 0.00 PRESS = 0.0 ! Etot = -856.0350 EKtot = 0.0000 EPtot = -856.0350 ! BOND = 24.6793 ANGLE = 75.7358 DIHED = 173.5178 1-4 NB = 172.5680 1-4 EEL = 2309.5141 VDWAALS = -271.4044 EELEC = -3215.6062 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -125.0394 ------------------------------------------------------------------------------ ! NSTEP = 1 TIME(PS) = 0.001 TEMP(K) = 0.02 PRESS = 0.0 ! Etot = -856.0018 EKtot = 0.0332 EPtot = -856.0350 ! BOND = 24.6793 ANGLE = 75.7358 DIHED = 173.5178 1-4 NB = 172.5680 1-4 EEL = 2309.5141 VDWAALS = -271.4044 EELEC = -3215.6062 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -125.0394 ------------------------------------------------------------------------------ ! NSTEP = 2 TIME(PS) = 0.002 TEMP(K) = 2.11 PRESS = 0.0 ! Etot = -856.2042 EKtot = 4.0775 EPtot = -860.2818 ! BOND = 23.1250 ANGLE = 74.9422 DIHED = 173.4796 ! 1-4 NB = 172.4272 1-4 EEL = 2309.3410 VDWAALS = -271.5589 ! EELEC = -3215.6356 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -126.4023 ------------------------------------------------------------------------------ ! NSTEP = 3 TIME(PS) = 0.003 TEMP(K) = 7.08 PRESS = 0.0 ! Etot = -856.6141 EKtot = 13.6684 EPtot = -870.2825 ! BOND = 19.5732 ANGLE = 72.8004 DIHED = 173.3731 ! 1-4 NB = 172.0315 1-4 EEL = 2308.8151 VDWAALS = -272.0158 ! EELEC = -3215.6774 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -129.1827 ------------------------------------------------------------------------------ ! NSTEP = 4 TIME(PS) = 0.004 TEMP(K) = 12.38 PRESS = 0.0 ! Etot = -856.7865 EKtot = 23.9086 EPtot = -880.6951 ! BOND = 16.2311 ANGLE = 69.9499 DIHED = 173.2208 ! 1-4 NB = 171.4524 1-4 EEL = 2307.9223 VDWAALS = -272.7610 ! EELEC = -3215.6122 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -131.0984 ------------------------------------------------------------------------------ ! NSTEP = 5 TIME(PS) = 0.005 TEMP(K) = 16.71 PRESS = 0.0 ! Etot = -856.6969 EKtot = 32.2717 EPtot = -888.9686 ! BOND = 14.3432 ANGLE = 67.2341 DIHED = 173.0568 ! 1-4 NB = 170.7833 1-4 EEL = 2306.6563 VDWAALS = -273.7785 ! EELEC = -3215.3021 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -131.9616 ------------------------------------------------------------------------------ ! NSTEP = 6 TIME(PS) = 0.006 TEMP(K) = 20.45 PRESS = 0.0 ! Etot = -856.6346 EKtot = 39.5051 EPtot = -896.1397 ! BOND = 13.5235 ANGLE = 65.4564 DIHED = 172.9226 ! 1-4 NB = 170.1118 1-4 EEL = 2305.0366 VDWAALS = -275.0414 ! EELEC = -3214.6582 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -133.4909 ------------------------------------------------------------------------------ ! NSTEP = 7 TIME(PS) = 0.007 TEMP(K) = 23.82 PRESS = 0.0 ! Etot = -856.7552 EKtot = 46.0168 EPtot = -902.7720 ! BOND = 12.9629 ANGLE = 65.1670 DIHED = 172.8628 ! 1-4 NB = 169.4956 1-4 EEL = 2303.1223 VDWAALS = -276.4925 ! EELEC = -3213.6938 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -136.1965 ------------------------------------------------------------------------------ ! NSTEP = 8 TIME(PS) = 0.008 TEMP(K) = 25.85 PRESS = 0.0 ! Etot = -856.8532 EKtot = 49.9354 EPtot = -906.7886 ! BOND = 12.7530 ANGLE = 66.5323 DIHED = 172.9210 ! 1-4 NB = 168.9480 1-4 EEL = 2301.0153 VDWAALS = -278.0396 ! EELEC = -3212.5404 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -138.3781 ------------------------------------------------------------------------------ ! NSTEP = 9 TIME(PS) = 0.009 TEMP(K) = 25.73 PRESS = 0.0 ! Etot = -856.7500 EKtot = 49.6986 EPtot = -906.4487 ! BOND = 13.6697 ANGLE = 69.3071 DIHED = 173.1346 ! 1-4 NB = 168.4346 1-4 EEL = 2298.8499 VDWAALS = -279.5746 ! EELEC = -3211.4175 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -138.8523 ------------------------------------------------------------------------------ ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 24.15 PRESS = 0.0 ! Etot = -856.5124 EKtot = 46.6529 EPtot = -903.1653 ! BOND = 15.8617 ANGLE = 72.9092 DIHED = 173.5310 ! 1-4 NB = 167.8825 1-4 EEL = 2296.7703 VDWAALS = -281.0031 ! EELEC = -3210.5663 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -138.5507 ------------------------------------------------------------------------------ A V E R A G E S O V E R 10 S T E P S ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 15.83 PRESS = 0.0 ! Etot = -856.5809 EKtot = 30.5768 EPtot = -887.1577 ! BOND = 16.6722 ANGLE = 70.0034 DIHED = 173.2020 ! 1-4 NB = 170.4135 1-4 EEL = 2304.7043 VDWAALS = -275.1670 ! EELEC = -3214.0710 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = -132.9153 ------------------------------------------------------------------------------ R M S F L U C T U A T I O N S ! NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 9.38 PRESS = 0.0 ! Etot = 0.2598 EKtot = 18.1254 EPtot = 18.3276 ! BOND = 4.1048 ANGLE = 3.7120 DIHED = 0.2475 ! 1-4 NB = 1.6104 1-4 EEL = 4.3490 VDWAALS = 3.2914 ! EELEC = 1.8284 EHBOND = 0.0000 RESTRAINT = 0.0000 ! ESCF = 4.8014 ! |E(PBS) = 0.0346 ------------------------------------------------------------------------------ *************** *** 230,248 **** 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.01 ( 0.05% of Total) ! | Nonbond force 0.15 ( 0.69% of Force) ! | QMMM energy 21.54 (99.22% of Force) ! | Bond/Angle/Dihedral 0.02 ( 0.09% of Force) ! | Force time 21.71 (100.0% of Runmd) ! | Verlet update time 0.01 ( 0.05% of Runmd) ! | Runmd Time 21.72 (99.45% of Total) ! | Other 0.11 ( 0.51% of Total) ! | Total time 21.84 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 12:12:18.246 on 03/02/2004 ! | Setup done at 12:12:18.367 on 03/02/2004 ! | Run done at 12:12:40.088 on 03/02/2004 | wallclock() was called 434 times --- 243,262 ---- 5. TIMINGS -------------------------------------------------------------------------------- ! | Read coords time 0.01 ( 0.02% of Total) ! | Nonbond force 0.11 ( 0.26% of Force) ! | QMMM energy 41.20 (99.68% of Force) ! | Bond/Angle/Dihedral 0.02 ( 0.06% of Force) ! | Force time 41.33 (99.59% of Runmd) ! | Verlet update time 0.16 ( 0.39% of Runmd) ! | Other 0.01 ( 0.03% of Runmd) ! | Runmd Time 41.50 (99.86% of Total) ! | Other 0.05 ( 0.12% of Total) ! | Total time 41.56 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 ! | Job began at 11:32:49.556 on 06/18/2004 ! | Setup done at 11:32:49.616 on 06/18/2004 ! | Run done at 11:33:31.120 on 06/18/2004 | wallclock() was called 434 times ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 14: Author: Ross Walker & Thomas Steinbrecher Date: 07/01/2004 Programs: LEaP Description: When checking a unit that has both initial and perturbed charges LEaP will incorrectly print a warning message implying that the perturbed charge is not zero when in fact it is. This is due to the checking routine not being updated to the new method of entering the perturbed charge in the form of the difference between the initial charge and the perturbed charge. This error simply involves the printing of perturbed charges. Although the warning is incorrect Leap still writes a correct prmtop file. Fix: save this file to bugfix.14 cd $AMBERHOME patch -N -p0 -r rejects < bugfix.14 ------------------------------------------------------------------------------ *** src/leap/src/leap/unit.c 2004-07-01 14:53:24.000000000 -0700 --- src/leap/src/leap/unit.c 2004-07-01 15:32:23.000000000 -0700 *************** *** 1803,1821 **** (*iPWarnings)++; } if ( bPert == TRUE ) { ! dAbs = fabs(dPertCharge); dFrac = fabs( dAbs - (double)(int)(dAbs+0.5) ); if ( dFrac > 0.01 ) { VP0(( "ERROR: The perturbed charge: %lf is not integral.\n", ! dPertCharge )); (*iPErrors)++; } ! if ( fabs(dPertCharge) > 0.01 ) { VP0(( "WARNING: The perturbed charge: %lf is not zero.\n", ! dPertCharge )); (*iPWarnings)++; } } --- 1803,1825 ---- (*iPWarnings)++; } if ( bPert == TRUE ) { ! /*Note dPertCharge now contains the delta perturbed charge rather than ! the actual perturbed charge. In other words the perturbed charge is now ! dCharge+dPertCharge ! */ ! dAbs = fabs(dCharge+dPertCharge); dFrac = fabs( dAbs - (double)(int)(dAbs+0.5) ); if ( dFrac > 0.01 ) { VP0(( "ERROR: The perturbed charge: %lf is not integral.\n", ! (dCharge+dPertCharge) )); (*iPErrors)++; } ! if ( fabs(dCharge+dPertCharge) > 0.01 ) { VP0(( "WARNING: The perturbed charge: %lf is not zero.\n", ! (dCharge+dPertCharge) )); (*iPWarnings)++; } } *** src/leap/src/leap/container.c 2004-07-01 15:44:27.000000000 -0700 --- src/leap/src/leap/container.c 2004-07-01 16:20:27.000000000 -0700 *************** *** 1149,1159 **** lAtoms = lLoop( (OBJEKT)cCont, ATOMS ); while ( aAtom = (ATOM)oNext(&lAtoms) ) { (*dPCharge) += dAtomCharge(aAtom); ! if ( bAtomPerturbed(aAtom) ) { ! (*dPPertCharge) += dAtomPertCharge(aAtom); ! } else { ! (*dPPertCharge) += dAtomCharge(aAtom); ! } } } --- 1149,1155 ---- lAtoms = lLoop( (OBJEKT)cCont, ATOMS ); while ( aAtom = (ATOM)oNext(&lAtoms) ) { (*dPCharge) += dAtomCharge(aAtom); ! (*dPPertCharge) += dAtomPertCharge(aAtom); } } *** src/leap/src/leap/commands.c 2004-07-01 15:29:11.000000000 -0700 --- src/leap/src/leap/commands.c 2004-07-01 15:31:39.000000000 -0700 *************** *** 2872,2878 **** ContainerTotalCharge( cCont, &dCharge, &dPertCharge ); VP0(( "Total unperturbed charge: %6.4lf\n", dCharge )); ! VP0(( "Total perturbed charge: %6.4lf\n", dPertCharge )); return(NULL); } --- 2872,2879 ---- ContainerTotalCharge( cCont, &dCharge, &dPertCharge ); VP0(( "Total unperturbed charge: %6.4lf\n", dCharge )); ! /*dPertCharge is now the delta of the charge and not the actual perturbed charge*/ ! VP0(( "Total perturbed charge: %6.4lf\n", (dCharge+dPertCharge) )); return(NULL); } ------------------------------------------------------------------------------ Temporary workarounds: Ignore the warnings and manually check the perturbed charge yourself. ********>Bugfix 15: Author: Scott Brozell (reported by F.-Y. Dupradeau) Date: 07/02/2004 Programs: LEaP Description: tleap and xleap may produce an unclear error message when transforming chirality orientations. The underlying cause may be faulty connection atoms in units produced by users. Fix: apply the following patch to amber8/src/leap/src/leap/chirality.c ------------------------------------------------------------------------------ *** src/leap/src/leap/chirality.c 25 Oct 2003 23:07:18 -0000 7.3 --- src/leap/src/leap/chirality.c 2 Jul 2004 23:32:47 -0000 *************** *** 112,124 **** break; } if ( j >= 4 ) { ! VP0(( "ERROR: Comparing atoms %s, %s, %s, %s to atoms %s, %s, %s, %s\n", ! sContainerName(aaOrig[0]), sContainerName(aaOrig[1]), ! sContainerName(aaOrig[2]), sContainerName(aaOrig[3]), ! sContainerName(aaNew[0]), sContainerName(aaNew[1]), ! sContainerName(aaNew[2]), sContainerName(aaNew[3]) )); ! DFATAL(( "Atom %s is not in the first list\n", ! sContainerName(aaNew[i]) )); } /* Swap elements and flip sign */ if ( j != i ) { --- 112,145 ---- break; } if ( j >= 4 ) { ! STRING sOrigDesc[4]; ! STRING sNewDesc[4]; ! VP0(( "ERROR: Comparing atoms\n" ! " %s, \n" ! " %s, \n" ! " %s, and \n" ! " %s \n" ! " to atoms\n" ! " %s, \n" ! " %s, \n" ! " %s, and \n" ! " %s \n" ! " This error may be due to faulty Connection atoms.\n", ! sContainerFullDescriptor( (CONTAINER) aaOrig[0], sOrigDesc[0] ), ! sContainerFullDescriptor( (CONTAINER) aaOrig[1], sOrigDesc[1] ), ! sContainerFullDescriptor( (CONTAINER) aaOrig[2], sOrigDesc[2] ), ! sContainerFullDescriptor( (CONTAINER) aaOrig[3], sOrigDesc[3] ), ! sContainerFullDescriptor( (CONTAINER) aaNew[0], sNewDesc[0] ), ! sContainerFullDescriptor( (CONTAINER) aaNew[1], sNewDesc[1] ), ! sContainerFullDescriptor( (CONTAINER) aaNew[2], sNewDesc[2] ), ! sContainerFullDescriptor( (CONTAINER) aaNew[3], sNewDesc[3] ) )); ! /* ! Describe( cContainerWithin( aaOrig[0] ) ) ; ! Describe( cContainerWithin( aaNew[i] ) ) ; ! */ ! DFATAL(( "Atom named %s from %s did not match !\n", ! sContainerName( aaNew[i] ), ! sContainerName( (CONTAINER) cContainerWithin(aaNew[i]) ) )); } /* Swap elements and flip sign */ if ( j != i ) { ------------------------------------------------------------------------------ Temporary workarounds are unnecessary; this is an enhancement. ********>Bugfix 16: Author: Dave Case Date: 07/29/2004 Programs: sander Description: One of the broadcasts from the master nodes to the slaves (in routine setup) had a bad length. This potentially could cause spurious results (first discovered on MacOSX systems). If your system appears to be working, and passes the parallel tests, then you should not need to worry, although applying the patch is still a good idea. Fix: apply the following patch to amber8/src/sander/parallel.f ------------------------------------------------------------------------------ *** src/sander/parallel.f 2004/02/10 02:10:12 7.112 --- src/sander/parallel.f 2004/07/29 21:25:51 *************** *** 83,89 **** ! extra.h: ! call mpi_bcast(ilbopt,6,MPI_INTEGER,0,commsander,ierr) call mpi_bcast(lbwght,1,MPI_DOUBLE_PRECISION,0,commsander,ierr) ! box.h: --- 83,89 ---- ! extra.h: ! call mpi_bcast(ilbopt,5,MPI_INTEGER,0,commsander,ierr) call mpi_bcast(lbwght,1,MPI_DOUBLE_PRECISION,0,commsander,ierr) ! box.h: ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 17: Author: Ross Walker Date: 08/03/2004 Programs: ptraj Description: When writing restrt files ptraj failed to close the open file handle before opening the next file. If you were writing a large number of restrt files this could lead to you exceeding the maximum number of open files allowed on your machine. At this point all further writes would fail. This patch adds the code to close the file correctly before opening the next. Fix: apply the following patch to amber8/src/ptraj/ptraj.c ------------------------------------------------------------------------------ *** src/ptraj/ptraj.c 2004-08-06 22:44:48.000000000 -0700 --- src/ptraj/ptraj.c 2004-08-06 22:47:44.000000000 -0700 *************** *** 3403,3415 **** sprintf(buffer, "%s", outInfo->filename); if ( openFile(&outInfo->file, buffer, "w") ) { dumpAmberRestart(outInfo->file, atoms, X, Y, Z, NULL, NULL, NULL, (outInfo->isBox ? box : NULL)); ! } else { fprintf(stdout, "WARNING in ptrajOutputCoordinates(): Could not open\n"); fprintf(stdout, "output coordinate file %s, not dumping to output file.\n", buffer); } --- 3403,3416 ---- sprintf(buffer, "%s", outInfo->filename); if ( openFile(&outInfo->file, buffer, "w") ) { dumpAmberRestart(outInfo->file, atoms, X, Y, Z, NULL, NULL, NULL, (outInfo->isBox ? box : NULL)); ! safe_fclose(outInfo->file); ! outInfo->file = NULL; } else { fprintf(stdout, "WARNING in ptrajOutputCoordinates(): Could not open\n"); fprintf(stdout, "output coordinate file %s, not dumping to output file.\n", buffer); } ------------------------------------------------------------------------------ Temporary workarounds: break your run up into smaller chunks so that you don't exceed the maximum open file limit. ********>Bugfix 18: Author: Dave Case (reported by Andy Purkiss) Date: 08/03/2004 Programs: anal, mainly; potentially other programs that call rgroup(). Description: The option to set igrp(i) < 0, in order to make a large number of groups, each with an individual residue, is broken. Fix: apply the following patch to amber8/src/lib/rgroup.f ------------------------------------------------------------------------------ *** src/lib/rgroup.f 2002/08/01 21:13:56 7.2 --- src/lib/rgroup.f 2004/08/05 15:54:32 *************** *** 162,168 **** C ----- 1ST GROUP OF 1ST CARD MUST BE - IF ANY - NUMBERS ARE C FOUND ----- C ! IF(ITIME.EQ.2.AND.IGRP(1).LT.0) LSIGN = 1 DO 12 I = 1,7 I1 = IGRP(I) IF (I1.EQ.0) GO TO 10 --- 162,168 ---- C ----- 1ST GROUP OF 1ST CARD MUST BE - IF ANY - NUMBERS ARE C FOUND ----- C ! IF(ITIME.EQ.1.AND.IGRP(1).LT.0) LSIGN = 1 DO 12 I = 1,7 I1 = IGRP(I) IF (I1.EQ.0) GO TO 10 ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 19: Author: Yong Duan Date: 08/03/2004 Programs: ff03 force field Description: The charges for the (rarely used) neutral lysine (LYN) were just copied from the ff94 force field, instead of being regenerated with the new charge scheme. Fix: apply the following patch to amber8/dat/leap/prep/all_amino03.in ------------------------------------------------------------------------------ *** dat/leap/prep/all_amino03.in 2003/12/31 18:04:06 1.4 --- dat/leap/prep/all_amino03.in 2004/06/24 17:05:37 *************** *** 780,806 **** 1 DUMM DU M 0 -1 -2 0.000 0.000 0.000 0.00000 2 DUMM DU M 1 0 -1 1.449 0.000 0.000 0.00000 3 DUMM DU M 2 1 0 1.522 111.100 0.000 0.00000 ! 4 N N M 3 2 1 1.335 116.600 180.000 -0.41570 ! 5 H H E 4 3 2 1.010 119.800 0.000 0.27190 ! 6 CA CT M 4 3 2 1.449 121.900 180.000 -0.07206 ! 7 HA H1 E 6 4 3 1.090 109.500 300.000 0.09940 ! 8 CB CT 3 6 4 3 1.525 111.100 60.000 -0.04845 ! 9 HB2 HC E 8 6 4 1.090 109.500 300.000 0.03400 ! 10 HB3 HC E 8 6 4 1.090 109.500 60.000 0.03400 ! 11 CG CT 3 8 6 4 1.525 109.470 180.000 0.06612 ! 12 HG2 HC E 11 8 6 1.090 109.500 300.000 0.01041 ! 13 HG3 HC E 11 8 6 1.090 109.500 60.000 0.01041 ! 14 CD CT 3 11 8 6 1.525 109.470 180.000 -0.03768 ! 15 HD2 HC E 14 11 8 1.090 109.500 300.000 0.01155 ! 16 HD3 HC E 14 11 8 1.090 109.500 60.000 0.01155 ! 17 CE CT 3 14 11 8 1.525 109.470 180.000 0.32604 ! 18 HE2 HP E 17 14 11 1.090 109.500 300.000 -0.03358 ! 19 HE3 HP E 17 14 11 1.090 109.500 60.000 -0.03358 ! 20 NZ N3 B 17 14 11 1.470 109.470 180.000 -1.03581 ! 21 HZ2 H E 20 17 14 1.010 109.470 180.000 0.38604 ! 22 HZ3 H E 20 17 14 1.010 109.470 300.000 0.38604 ! 23 C C M 6 4 3 1.522 111.100 180.000 0.59730 ! 24 O O E 24 6 4 1.229 120.500 0.000 -0.56790 IMPROPER -M CA N H --- 780,814 ---- 1 DUMM DU M 0 -1 -2 0.000 0.000 0.000 0.00000 2 DUMM DU M 1 0 -1 1.449 0.000 0.000 0.00000 3 DUMM DU M 2 1 0 1.522 111.100 0.000 0.00000 ! 4 N N M 3 2 1 1.335 116.600 180.000 -0.453388 ! 5 H H E 4 3 2 1.010 119.800 0.000 0.289695 ! 6 CA CT M 4 3 2 1.449 121.900 180.000 -0.024500 ! 7 HA H1 E 6 4 3 1.090 109.500 300.000 0.099553 ! 8 CB CT 3 6 4 3 1.525 111.100 60.000 0.035478 ! 9 HB2 HC E 8 6 4 1.090 109.500 300.000 0.004797 ! 10 HB3 HC E 8 6 4 1.090 109.500 60.000 0.004797 ! 11 CG CT 3 8 6 4 1.525 109.470 180.000 -0.019962 ! 12 HG2 HC E 11 8 6 1.090 109.500 300.000 -0.015610 ! 13 HG3 HC E 11 8 6 1.090 109.500 60.000 -0.015610 ! 14 CD CT 3 11 8 6 1.525 109.470 180.000 0.041105 ! 15 HD2 HC E 14 11 8 1.090 109.500 300.000 0.008304 ! 16 HD3 HC E 14 11 8 1.090 109.500 60.000 0.008304 ! 17 CE CT 3 14 11 8 1.525 109.470 180.000 0.188382 ! 18 HE2 HP E 17 14 11 1.090 109.500 300.000 0.016810 ! 19 HE3 HP E 17 14 11 1.090 109.500 60.000 0.016810 ! 20 NZ N3 B 17 14 11 1.470 109.470 180.000 -0.894254 ! 21 HZ2 H E 20 17 14 1.010 109.470 180.000 0.332053 ! 22 HZ3 H E 20 17 14 1.010 109.470 300.000 0.332053 ! 23 C C M 6 4 3 1.522 111.100 180.000 0.608464 ! 24 O O E 24 6 4 1.229 120.500 0.000 -0.563281 ! ! CHARGE ! -0.453388 0.289695 -0.024500 0.099553 0.035478 ! 0.004797 0.004797 -0.019962 -0.015610 -0.015610 ! 0.041105 0.008304 0.008304 0.188382 0.016810 ! 0.016810 -0.894254 0.332053 0.332053 0.608464 ! -0.563281 ! IMPROPER -M CA N H ------------------------------------------------------------------------------ Also, you should patch amber8/dat/leap/lib/all_amino03.lib: ------------------------------------------------------------------------------ *** dat/leap/lib/all_amino03.lib 2003/07/23 22:01:01 7.3 --- dat/leap/lib/all_amino03.lib 2004/06/24 17:12:15 *************** *** 2121,2147 **** 0.0 0.0 0.0 0.0 0.0 0.0 !entry.LYN.unit.atoms table str name str type int typex int resx int flags int seq int elmnt dbl chg ! "N" "N" 0 1 131072 1 7 -0.415700 ! "H" "H" 0 1 131072 2 1 0.271900 ! "CA" "CT" 0 1 131072 3 6 -0.072060 ! "HA" "H1" 0 1 131072 4 1 0.099400 ! "CB" "CT" 0 1 131072 5 6 -0.048450 ! "HB2" "HC" 0 1 131072 6 1 0.034000 ! "HB3" "HC" 0 1 131072 7 1 0.034000 ! "CG" "CT" 0 1 131072 8 6 0.066120 ! "HG2" "HC" 0 1 131072 9 1 0.010410 ! "HG3" "HC" 0 1 131072 10 1 0.010410 ! "CD" "CT" 0 1 131072 11 6 -0.037680 ! "HD2" "HC" 0 1 131072 12 1 0.011550 ! "HD3" "HC" 0 1 131072 13 1 0.011550 ! "CE" "CT" 0 1 131072 14 6 0.326040 ! "HE2" "HP" 0 1 131072 15 1 -0.033580 ! "HE3" "HP" 0 1 131072 16 1 -0.033580 ! "NZ" "N3" 0 1 131072 17 7 -1.035810 ! "HZ2" "H" 0 1 131072 18 1 0.386040 ! "HZ3" "H" 0 1 131072 19 1 0.386040 ! "C" "C" 0 1 131072 20 6 0.597300 ! "O" "O" 0 1 131072 21 8 -0.567900 !entry.LYN.unit.atomspertinfo table str pname str ptype int ptypex int pelmnt dbl pchg "N" "N" 0 -1 0.0 "H" "H" 0 -1 0.0 --- 2121,2147 ---- 0.0 0.0 0.0 0.0 0.0 0.0 !entry.LYN.unit.atoms table str name str type int typex int resx int flags int seq int elmnt dbl chg ! "N" "N" 0 1 131072 1 7 -0.453388 ! "H" "H" 0 1 131072 2 1 0.289695 ! "CA" "CT" 0 1 131072 3 6 -0.024500 ! "HA" "H1" 0 1 131072 4 1 0.099553 ! "CB" "CT" 0 1 131072 5 6 0.035478 ! "HB2" "HC" 0 1 131072 6 1 0.004797 ! "HB3" "HC" 0 1 131072 7 1 0.004797 ! "CG" "CT" 0 1 131072 8 6 -0.019962 ! "HG2" "HC" 0 1 131072 9 1 -0.015610 ! "HG3" "HC" 0 1 131072 10 1 -0.015610 ! "CD" "CT" 0 1 131072 11 6 0.041105 ! "HD2" "HC" 0 1 131072 12 1 0.008304 ! "HD3" "HC" 0 1 131072 13 1 0.008304 ! "CE" "CT" 0 1 131072 14 6 0.188382 ! "HE2" "HP" 0 1 131072 15 1 0.016810 ! "HE3" "HP" 0 1 131072 16 1 0.016810 ! "NZ" "N3" 0 1 131072 17 7 -0.894254 ! "HZ2" "H" 0 1 131072 18 1 0.332053 ! "HZ3" "H" 0 1 131072 19 1 0.332053 ! "C" "C" 0 1 131072 20 6 0.608464 ! "O" "O" 0 1 131072 21 8 -0.563281 !entry.LYN.unit.atomspertinfo table str pname str ptype int ptypex int pelmnt dbl pchg "N" "N" 0 -1 0.0 "H" "H" 0 -1 0.0 ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 20: Author: Dave Case and Karl Kirschner Date: 08/04/2004 Programs: glycam force field Description: The glycam04EP.dat parameter file has frcmod-style headers for various sections, but these should not be there. Fix: apply the following patch to amber8/dat/leap/parm/glycam04EP.dat ------------------------------------------------------------------------------ *** dat/leap/parm/glycam04EP.dat 14 Mar 2004 06:14:51 -0000 8.0 --- dat/leap/parm/glycam04EP.dat 30 Jun 2004 13:49:02 -0000 *************** *** 1,5 **** GLYCAM PARAMETERS (FOR AMBER 8.0), COPYRIGHT R.J.WOODS, CCRC 2003 - MASS C 12.01 0.00 sp2 C carbonyl group CG 12.01 0.00 CG ALPHA ANOMERIC CARBON (P94=PARM94) OH 16.00 0.00 OH HYDROXYL OXYGEN --- 1,4 ---- *************** *** 16,22 **** HW 1.008 0.00 H in TIP3P water EP 3.000 0.00 lone pair - BOND CG-CG 310.00 1.520 SCEE=1.0, SCNB=1.0 Butane (g, t) KNK CG-HC 360.00 1.095 SCEE=1.0, SCNB=1.0 Ethane KNK CG-H1 410.00 1.092 SCEE=1.0, SCNB=1.0 Methanol KNK --- 15,20 ---- *************** *** 39,45 **** EP-OS 553.0 0.700 EP-O 553.0 0.450 - ANGLE HC-CG-HC 40.00 109.50 SCEE=1.0, SCNB=1.0 Methane, Ethane KNK H1-CG-H1 45.00 109.50 SCEE=1.0, SCNB=1.0 Methanol, Propanol KNK H2-CG-H2 45.00 109.50 SCEE=1.0, SCNB=1.0 Methanol, Propanol KNK --- 37,42 ---- *************** *** 93,99 **** EP-O -EP 150.00 120.0 EP-O -C 150.00 120.0 - DIHE HC-CG-CG-HC 9 1.20 0.00 3. SCEE=1.0, SCNB=1.0, Ethane Hs=0 charge KNK H1-CG-CG-HC 1 0.17 0.00 3. SCEE=1.0, SCNB=1.0, Ethanol, after H1-CG-CG-CG KNK H2-CG-CG-HC 1 0.17 0.00 3. SCEE=1.0, SCNB=1.0, Ethanol, after H1-CG-CG-CG KNK --- 90,95 ---- *************** *** 160,165 **** --- 156,162 ---- H2-CG-C -O2 2 0.00 0.00 1. SCEE=1.0, SCNB=1.0, 1_1_Dimethoxyacetate KNK OS-CG-C -O2 2 0.00 0.00 1. SCEE=1.0, SCNB=1.0, CG-OS-CG-C 1 0.80 0.00 2. SCEE=1.0, SCNB=1.0, 2-Methylpropanoate, 2-Methoxy-2-Methylpropanoate KNK + X -X -N -H 1.00 180. 2. X -X -C -O 10.5 180. 2. X -X -N -CG 10.5 180. 2. *************** *** 171,183 **** N NA N2 N* NC NB N3 NP NO C C* CA CB CC CN CM CK CQ CW CV CR CA CX CY CD ! NONB H 0.6000 0.0157 !Ferguson base pair geom. HO 0.0000 0.0000 OPLS Jorgensen, JACS,110,(1988),1657 HC 1.4870 0.0157 OPLS H1 1.3870 0.0157 Veenstra et al JCC,8,(1992),963 H2 1.2870 0.0157 Veenstra et al JCC,8,(1992),963 - H3 1.1870 0.0157 Veenstra et al JCC,8,(1992),963 HW 0.0000 0.0000 TIP3P water model O 1.6612 0.2100 OPLS O2 1.6612 0.2100 OPLS --- 168,179 ---- N NA N2 N* NC NB N3 NP NO C C* CA CB CC CN CM CK CQ CW CV CR CA CX CY CD ! MOD4 RE H 0.6000 0.0157 !Ferguson base pair geom. HO 0.0000 0.0000 OPLS Jorgensen, JACS,110,(1988),1657 HC 1.4870 0.0157 OPLS H1 1.3870 0.0157 Veenstra et al JCC,8,(1992),963 H2 1.2870 0.0157 Veenstra et al JCC,8,(1992),963 HW 0.0000 0.0000 TIP3P water model O 1.6612 0.2100 OPLS O2 1.6612 0.2100 OPLS ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 21: Author: Dave Case (reported by Karen Haskell at NEC) Date: 08/13/2004 Programs: sander, pbsa Description: The rdparm.f files in sander and pbsa have empty statements in them. NEC compilers (and maybe others) won't accept such constructs Fix: apply the following patch to amber8/src/sander/rdparm.f ------------------------------------------------------------------------------ *** src/sander/rdparm.f 2004/07/29 21:25:07 7.76 --- src/sander/rdparm.f 2004/08/14 00:09:35 *************** *** 66,72 **** nhparm,nparm,nnb,nres,nbona,ntheta,nphia,numbnd, & numang,nptra,natyp,nphb,ifbox,nmxrs,ifcap,numextra & ,ncopy - ; ! line terminator for free-form version 8118 format(t2, & 'NATOM = ',i7,' NTYPES = ',i7,' NBONH = ',i7,' MBONA = ',i7, & /' NTHETH = ',i7,' MTHETA = ',i7,' NPHIH = ',i7,' MPHIA = ',i7, & --- 66,71 ---- ------------------------------------------------------------------------------ Also apply the following patch to amber8/src/pbsa/rdparm.f ------------------------------------------------------------------------------ *** src/pbsa/rdparm.f 2004/03/08 16:31:58 1.2 --- src/pbsa/rdparm.f 2004/08/14 00:10:12 *************** *** 51,57 **** nhparm,nparm,nnb,nres,nbona,ntheta,nphia,numbnd, & numang,nptra,natyp,nphb,ifbox,nmxrs,ifcap,numextra & ,ncopy - ; ! line terminator for free-form version 8118 format(t2, & 'NATOM = ',i7,' NTYPES = ',i7,' NBONH = ',i7,' MBONA = ',i7, & /' NTHETH = ',i7,' MTHETA = ',i7,' NPHIH = ',i7,' MPHIA = ',i7, & --- 51,56 ---- ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 22: Author: Dave Case Date: 08/17/2004 Programs: anal Description: The error message when there is insufficient Hollerith memory prints out the wrong number for how much memory is needed. Fix: apply the following patch to amber8/src/anal/locmem.f ------------------------------------------------------------------------------ *** src/anal/locmem.f 2000/11/09 17:49:07 7.2 --- src/anal/locmem.f 2004/08/17 16:25:08 *************** *** 100,106 **** c if (ihend .gt. MAXHOL) then write(6,'(/,5x,a,i8,2x,a,i8)') ! + 'Hollerith memory requirement of:',l95, + 'exceeds MAXHOL of', MAXHOL call mexit(6, 1) endif --- 100,106 ---- c if (ihend .gt. MAXHOL) then write(6,'(/,5x,a,i8,2x,a,i8)') ! + 'Hollerith memory requirement of:',ihend, + 'exceeds MAXHOL of', MAXHOL call mexit(6, 1) endif ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 23: Author: John Mongan Date: 09/01/2004 Programs: sander (constant pH calcualtions) Description: If there is only one titrating site, a poorly initialized variable might lead to crashes Fix: apply the following patch to amber8/src/sander/mdread.f ------------------------------------------------------------------------------ *** src/sander/mdread.f 2004/05/03 17:49:02 7.288 --- src/sander/mdread.f 2004/08/20 20:49:06 *************** *** 497,503 **** common /cnstphresname/ resname namelist /cnstph/ stateinf, resstate, protcnt, chrgdat, statene,trescnt,resname ! icumstat = 0 icumchrg = 0 write(6,'(a,a)') 'reading charge increments from file: ',cpin --- 497,503 ---- common /cnstphresname/ resname namelist /cnstph/ stateinf, resstate, protcnt, chrgdat, statene,trescnt,resname ! icumstat = -1 icumchrg = 0 write(6,'(a,a)') 'reading charge increments from file: ',cpin ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 24: Author: John Mongan Date: 09/01/2004 Programs: ptraj Description: When the grid command is used, blank lines will be mistakenly entered into the output if the number of cells in a plane is divisible by 6. Also, the command will fail if the "box" option is set. Fix: apply the following patch to amber8/src/ptraj/actions.c ------------------------------------------------------------------------------ *** src/ptraj/actions.c 2004/08/08 17:33:40 1.36 --- src/ptraj/actions.c 2004/09/01 20:54:26 *************** *** 4405,4413 **** action->iarg1 = 0; if (action->iarg1 == 1 && ! (action->state->box[3] != 90.0 || box[3] != 90.0 || ! action->state->box[4] != 90.0 || box[4] != 90.0 || ! action->state->box[5] != 90.0 || box[5] != 90.0)) { fprintf(stdout, "WARNING in ptraj() dipole: Code to shift to the box center\n"); fprintf(stdout, "is not implemented yet in transformDipole for non-orthorhomibic\n"); fprintf(stdout, "unit cells. Shifting to the origin instead!!!\n"); --- 4405,4413 ---- action->iarg1 = 0; if (action->iarg1 == 1 && ! (action->state->box[3] != 90.0 || ! action->state->box[4] != 90.0 || ! action->state->box[5] != 90.0 )) { fprintf(stdout, "WARNING in ptraj() dipole: Code to shift to the box center\n"); fprintf(stdout, "is not implemented yet in transformDipole for non-orthorhomibic\n"); fprintf(stdout, "unit cells. Shifting to the origin instead!!!\n"); *************** *** 4505,4511 **** if ( gridInfo->grid[index] > gridMax ) gridMax = gridInfo->grid[index]; } ! if ( c % 6 != 0 ) fprintf(outFile, "\n"); } } --- 4505,4511 ---- if ( gridInfo->grid[index] > gridMax ) gridMax = gridInfo->grid[index]; } ! if ( (c-1) % 6 != 0 ) /* unless a newline was just written.. */ fprintf(outFile, "\n"); } } ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 25: Author: Dave Mathews Date: 09/29/2004 Programs: sander Description: If weight changes are used to vary the value of TEMP0 during the run, Langevin dynamics will not work properly, since the random force properties are not updated correctly. Fix: apply the following patch to amber8/src/sander/runmd.f ------------------------------------------------------------------------------ *** src/sander/runmd.f 2004/08/08 17:32:08 7.258 --- src/sander/runmd.f 2004/09/29 17:37:03 *************** *** 1012,1017 **** --- 1012,1027 ---- ! Loncharich, Brooks and Pastor, Biopolymers 32:523-535 (1992), ! Eq. 11. (Note that the first term on the rhs of Eq. 11b ! should not be there.) + + ! Update the Langevin parameters, since temp0 may have changed: + if (nmropt>0) then + sdfac = sqrt( 4.d0*gammai*boltz2*temp0/dtx ) + #ifdef LES + sdfacles = sqrt( 4.d0*gammai*boltz2*temp0les/dtx ) + #endif + endif + + #ifdef PSANDER do idcmp=0,nneedatm-1 ------------------------------------------------------------------------------ Temporary workarounds: none. ********>Bugfix 26: Author: Ross Walker Date: 11/23/2004 Programs: sander.QMMM Description: The velocity array is not correctly allocated for simulations involving link atoms. This means that QMMM simulations involving link atoms may be unstable. Fix: apply the following patch to amber8/src/sander/locmem.f amber8/test/qmmm/divcon/crambin_md.out.save ------------------------------------------------------------------------------ --- src/sander/locmem.f 2004-11-23 20:05:44.000000000 -0800 +++ src/sander/locmem.f 2004-11-23 20:06:15.000000000 -0800 @@ -179,10 +179,10 @@ call adj_mem_ptr( r_ptr, lcrd, 3*natom + mxvar+3*ncpp ) call adj_mem_ptr( r_ptr, lforce, 3*natom + mxvar + 40+3*ncpp ) if (imin == 0) then - call adj_mem_ptr( r_ptr, lvel, 3*natom + mxvar ) - call adj_mem_ptr( r_ptr, lvel2, 3*natom + mxvar ) + call adj_mem_ptr( r_ptr, lvel, 3*natom + mxvar + 3*ncpp) + call adj_mem_ptr( r_ptr, lvel2, 3*natom + mxvar + 3*ncpp) else - call adj_mem_ptr( r_ptr, lvel, 6*(3*natom + mxvar) ) + call adj_mem_ptr( r_ptr, lvel, 6*(3*natom + mxvar + 3*ncpp) ) call adj_mem_ptr( r_ptr, lvel2, 0 ) end if call adj_mem_ptr( r_ptr, l45, 3*natom + mxvar+3*ncpp ) ------------------------------------------------------------------ --- test/qmmm/divcon/crambin_md.out.save 2004-08-08 10:31:03.000000000 -0700 +++ test/qmmm/divcon/crambin_md.out.save 2004-11-23 20:09:14.000000000 -0800 @@ -3,7 +3,7 @@ Amber 8 SANDER Scripps/UCSF 2004 ------------------------------------------------------- -| Run on 06/18/2004 at 11:32:49 +| Run on 11/23/2004 at 20:08:39 [-O]verwriting output File Assignments: @@ -60,13 +60,13 @@ | Memory Use Allocated -| Real 18266 +| Real 20066 | Hollerith 5400 | Integer 55343 | Max Pairs 205761 | Max Rstack 56420 | Max Istack 3210 -| Total 1637 kbytes +| Total 1651 kbytes | Duplicated 0 dihedrals | Duplicated 0 dihedrals @@ -124,8 +124,8 @@ ------------------------------------------------------------------------------ - NSTEP = 1 TIME(PS) = 0.001 TEMP(K) = 0.02 PRESS = 0.0 - Etot = -856.0018 EKtot = 0.0332 EPtot = -856.0350 + NSTEP = 1 TIME(PS) = 0.001 TEMP(K) = 0.01 PRESS = 0.0 + Etot = -856.0253 EKtot = 0.0097 EPtot = -856.0350 BOND = 24.6793 ANGLE = 75.7358 DIHED = 173.5178 1-4 NB = 172.5680 1-4 EEL = 2309.5141 VDWAALS = -271.4044 EELEC = -3215.6062 EHBOND = 0.0000 RESTRAINT = 0.0000 @@ -134,108 +134,108 @@ NSTEP = 2 TIME(PS) = 0.002 TEMP(K) = 2.11 PRESS = 0.0 - Etot = -856.2042 EKtot = 4.0775 EPtot = -860.2818 + Etot = -856.2092 EKtot = 4.0782 EPtot = -860.2874 BOND = 23.1250 ANGLE = 74.9422 DIHED = 173.4796 1-4 NB = 172.4272 1-4 EEL = 2309.3410 VDWAALS = -271.5589 EELEC = -3215.6356 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -126.4023 + ESCF = -126.4079 ------------------------------------------------------------------------------ NSTEP = 3 TIME(PS) = 0.003 TEMP(K) = 7.08 PRESS = 0.0 - Etot = -856.6141 EKtot = 13.6684 EPtot = -870.2825 - BOND = 19.5732 ANGLE = 72.8004 DIHED = 173.3731 - 1-4 NB = 172.0315 1-4 EEL = 2308.8151 VDWAALS = -272.0158 + Etot = -856.6127 EKtot = 13.6847 EPtot = -870.2974 + BOND = 19.5733 ANGLE = 72.8005 DIHED = 173.3731 + 1-4 NB = 172.0314 1-4 EEL = 2308.8151 VDWAALS = -272.0157 EELEC = -3215.6774 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -129.1827 + ESCF = -129.1977 ------------------------------------------------------------------------------ - NSTEP = 4 TIME(PS) = 0.004 TEMP(K) = 12.38 PRESS = 0.0 - Etot = -856.7865 EKtot = 23.9086 EPtot = -880.6951 - BOND = 16.2311 ANGLE = 69.9499 DIHED = 173.2208 - 1-4 NB = 171.4524 1-4 EEL = 2307.9223 VDWAALS = -272.7610 + NSTEP = 4 TIME(PS) = 0.004 TEMP(K) = 12.39 PRESS = 0.0 + Etot = -856.7816 EKtot = 23.9369 EPtot = -880.7185 + BOND = 16.2314 ANGLE = 69.9502 DIHED = 173.2208 + 1-4 NB = 171.4518 1-4 EEL = 2307.9223 VDWAALS = -272.7607 EELEC = -3215.6122 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -131.0984 + ESCF = -131.1221 ------------------------------------------------------------------------------ - NSTEP = 5 TIME(PS) = 0.005 TEMP(K) = 16.71 PRESS = 0.0 - Etot = -856.6969 EKtot = 32.2717 EPtot = -888.9686 - BOND = 14.3432 ANGLE = 67.2341 DIHED = 173.0568 - 1-4 NB = 170.7833 1-4 EEL = 2306.6563 VDWAALS = -273.7785 - EELEC = -3215.3021 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -131.9616 + NSTEP = 5 TIME(PS) = 0.005 TEMP(K) = 16.73 PRESS = 0.0 + Etot = -856.6956 EKtot = 32.3137 EPtot = -889.0093 + BOND = 14.3439 ANGLE = 67.2348 DIHED = 173.0568 + 1-4 NB = 170.7816 1-4 EEL = 2306.6563 VDWAALS = -273.7779 + EELEC = -3215.3022 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -132.0026 ------------------------------------------------------------------------------ - NSTEP = 6 TIME(PS) = 0.006 TEMP(K) = 20.45 PRESS = 0.0 - Etot = -856.6346 EKtot = 39.5051 EPtot = -896.1397 - BOND = 13.5235 ANGLE = 65.4564 DIHED = 172.9226 - 1-4 NB = 170.1118 1-4 EEL = 2305.0366 VDWAALS = -275.0414 - EELEC = -3214.6582 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -133.4909 + NSTEP = 6 TIME(PS) = 0.006 TEMP(K) = 20.48 PRESS = 0.0 + Etot = -856.6510 EKtot = 39.5631 EPtot = -896.2142 + BOND = 13.5246 ANGLE = 65.4577 DIHED = 172.9226 + 1-4 NB = 170.1081 1-4 EEL = 2305.0366 VDWAALS = -275.0403 + EELEC = -3214.6583 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -133.5653 ------------------------------------------------------------------------------ - NSTEP = 7 TIME(PS) = 0.007 TEMP(K) = 23.82 PRESS = 0.0 - Etot = -856.7552 EKtot = 46.0168 EPtot = -902.7720 - BOND = 12.9629 ANGLE = 65.1670 DIHED = 172.8628 - 1-4 NB = 169.4956 1-4 EEL = 2303.1223 VDWAALS = -276.4925 + NSTEP = 7 TIME(PS) = 0.007 TEMP(K) = 23.86 PRESS = 0.0 + Etot = -856.7998 EKtot = 46.0895 EPtot = -902.8893 + BOND = 12.9645 ANGLE = 65.1688 DIHED = 172.8630 + 1-4 NB = 169.4894 1-4 EEL = 2303.1224 VDWAALS = -276.4911 EELEC = -3213.6938 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -136.1965 + ESCF = -136.3125 ------------------------------------------------------------------------------ - NSTEP = 8 TIME(PS) = 0.008 TEMP(K) = 25.85 PRESS = 0.0 - Etot = -856.8532 EKtot = 49.9354 EPtot = -906.7886 - BOND = 12.7530 ANGLE = 66.5323 DIHED = 172.9210 - 1-4 NB = 168.9480 1-4 EEL = 2301.0153 VDWAALS = -278.0396 + NSTEP = 8 TIME(PS) = 0.008 TEMP(K) = 25.90 PRESS = 0.0 + Etot = -856.9223 EKtot = 50.0189 EPtot = -906.9412 + BOND = 12.7550 ANGLE = 66.5343 DIHED = 172.9212 + 1-4 NB = 168.9389 1-4 EEL = 2301.0154 VDWAALS = -278.0384 EELEC = -3212.5404 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -138.3781 + ESCF = -138.5271 ------------------------------------------------------------------------------ - NSTEP = 9 TIME(PS) = 0.009 TEMP(K) = 25.73 PRESS = 0.0 - Etot = -856.7500 EKtot = 49.6986 EPtot = -906.4487 - BOND = 13.6697 ANGLE = 69.3071 DIHED = 173.1346 - 1-4 NB = 168.4346 1-4 EEL = 2298.8499 VDWAALS = -279.5746 - EELEC = -3211.4175 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -138.8523 + NSTEP = 9 TIME(PS) = 0.009 TEMP(K) = 25.78 PRESS = 0.0 + Etot = -856.8300 EKtot = 49.7917 EPtot = -906.6217 + BOND = 13.6716 ANGLE = 69.3091 DIHED = 173.1348 + 1-4 NB = 168.4229 1-4 EEL = 2298.8500 VDWAALS = -279.5744 + EELEC = -3211.4174 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -139.0184 ------------------------------------------------------------------------------ - NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 24.15 PRESS = 0.0 - Etot = -856.5124 EKtot = 46.6529 EPtot = -903.1653 - BOND = 15.8617 ANGLE = 72.9092 DIHED = 173.5310 - 1-4 NB = 167.8825 1-4 EEL = 2296.7703 VDWAALS = -281.0031 - EELEC = -3210.5663 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -138.5507 + NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 24.21 PRESS = 0.0 + Etot = -856.5935 EKtot = 46.7574 EPtot = -903.3510 + BOND = 15.8628 ANGLE = 72.9116 DIHED = 173.5312 + 1-4 NB = 167.8692 1-4 EEL = 2296.7706 VDWAALS = -281.0047 + EELEC = -3210.5660 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -138.7257 ------------------------------------------------------------------------------ A V E R A G E S O V E R 10 S T E P S - NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 15.83 PRESS = 0.0 - Etot = -856.5809 EKtot = 30.5768 EPtot = -887.1577 - BOND = 16.6722 ANGLE = 70.0034 DIHED = 173.2020 - 1-4 NB = 170.4135 1-4 EEL = 2304.7043 VDWAALS = -275.1670 - EELEC = -3214.0710 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = -132.9153 + NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 15.85 PRESS = 0.0 + Etot = -856.6121 EKtot = 30.6244 EPtot = -887.2365 + BOND = 16.6731 ANGLE = 70.0045 DIHED = 173.2021 + 1-4 NB = 170.4088 1-4 EEL = 2304.7044 VDWAALS = -275.1666 + EELEC = -3214.0709 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = -132.9919 ------------------------------------------------------------------------------ R M S F L U C T U A T I O N S - NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 9.38 PRESS = 0.0 - Etot = 0.2598 EKtot = 18.1254 EPtot = 18.3276 - BOND = 4.1048 ANGLE = 3.7120 DIHED = 0.2475 - 1-4 NB = 1.6104 1-4 EEL = 4.3490 VDWAALS = 3.2914 - EELEC = 1.8284 EHBOND = 0.0000 RESTRAINT = 0.0000 - ESCF = 4.8014 -|E(PBS) = 0.0346 + NSTEP = 10 TIME(PS) = 0.010 TEMP(K) = 9.40 PRESS = 0.0 + Etot = 0.2689 EKtot = 18.1642 EPtot = 18.3894 + BOND = 4.1042 ANGLE = 3.7115 DIHED = 0.2474 + 1-4 NB = 1.6151 1-4 EEL = 4.3490 VDWAALS = 3.2916 + EELEC = 1.8285 EHBOND = 0.0000 RESTRAINT = 0.0000 + ESCF = 4.8647 +|E(PBS) = 0.0256 ------------------------------------------------------------------------------ @@ -243,20 +243,20 @@ 5. TIMINGS -------------------------------------------------------------------------------- -| Read coords time 0.01 ( 0.02% of Total) -| Nonbond force 0.11 ( 0.26% of Force) -| QMMM energy 41.20 (99.68% of Force) -| Bond/Angle/Dihedral 0.02 ( 0.06% of Force) -| Force time 41.33 (99.59% of Runmd) -| Verlet update time 0.16 ( 0.39% of Runmd) +| Read coords time 0.00 ( 0.01% of Total) +| Nonbond force 0.13 ( 0.38% of Force) +| QMMM energy 34.83 (99.52% of Force) +| Bond/Angle/Dihedral 0.04 ( 0.10% of Force) +| Force time 35.00 (99.43% of Runmd) +| Verlet update time 0.19 ( 0.54% of Runmd) | Other 0.01 ( 0.03% of Runmd) -| Runmd Time 41.50 (99.86% of Total) -| Other 0.05 ( 0.12% of Total) -| Total time 41.56 (100.0% of ALL ) +| Runmd Time 35.20 (99.88% of Total) +| Other 0.04 ( 0.11% of Total) +| Total time 35.24 (100.0% of ALL ) | Highest rstack allocated: 0 | Highest istack allocated: 0 -| Job began at 11:32:49.556 on 06/18/2004 -| Setup done at 11:32:49.616 on 06/18/2004 -| Run done at 11:33:31.120 on 06/18/2004 +| Job began at 20:08:39.203 on 11/23/2004 +| Setup done at 20:08:39.245 on 11/23/2004 +| Run done at 20:09:14.448 on 11/23/2004 | wallclock() was called 434 times ---------------------------------------------------------------------------- Temporary workaround: NONE ********>Bugfix 27: Author: Yong Duan Date: 12/02/2004 Programs: sander Description: The "dielc" variable should not be used in conjunction with generalized Born calculations (use intdiel and extdiel instead), but this is not enforced in the program. This can lead to user errors, particularly in scripts generated by mm_pbsa. Fix: apply the following patch to amber8/src/sander/rdparm.f ------------------------------------------------------------------------------ *** src/sander/rdparm.f 2004/08/14 00:10:56 7.77 --- src/sander/rdparm.f 2004/12/02 18:59:54 *************** *** 810,816 **** ! ----- SCALE THE CHARGES IF DIELC.GT.1.0E0 ----- ! if (dielc /= 1.0e0) then dumd = sqrt(dielc) do i = 1,natom x(i+l15-1) = x(i+l15-1)/dumd --- 810,816 ---- ! ----- SCALE THE CHARGES IF DIELC.GT.1.0E0 ----- ! if (dielc /= 1.0e0 .and. igb == 0) then dumd = sqrt(dielc) do i = 1,natom x(i+l15-1) = x(i+l15-1)/dumd ---------------------------------------------------------------------------- Temporary workaround: Don't set the dielc variable when GB is also set. ********>Bugfix 28: Author: Junmei Wang and Anthony Fejes Date: 12/10/2004 Programs: antechamber (gaff.dat file) Description: There were some copy-and-paste errors leading to duplicate and erroneous entries, plus a few parameters that referred to non-existent atom types. Fix: apply the following patch to amber8/dat/leap/parm/gaff.dat ------------------------------------------------------------------------------ *** dat/leap/parm/gaff.dat 2003/11/13 23:51:07 1.12 --- dat/leap/parm/gaff.dat 2004/12/10 17:58:26 *************** *** 163,169 **** c1-na 452.0 1.362 SOURCE3 8 0.0031 0.0034 c1-ne 741.8 1.220 SOURCE3 1 0.0000 0.0000 c1-nf 741.8 1.220 SOURCE3 1 same as c1-ne - c1-ng 465.7 1.353 SOURCE3 3 0.0025 0.0027 c1-nh 465.7 1.353 SOURCE3 3 0.0025 0.0027 c1-no 393.0 1.405 SOURCE3 3 0.0004 0.0005 c1-o 777.0 1.166 SOURCE2 9 0.0044 0.0052 --- 163,168 ---- *************** *** 333,339 **** cc-pd 318.2 1.733 SOURCE3 84 same as cd-pc cc-ss 279.3 1.737 SOURCE3 52 0.0162 0.0194 cd-cd 418.3 1.429 SOURCE1 740 0.0058 0.0069 - cd-cd 504.0 1.371 SOURCE3 523 same as cc-cd cd-ce 519.2 1.362 SOURCE3 1 same as cc-cf cd-cg 420.9 1.427 SOURCE1 560 0.0000 0.0000 cd-ch 420.9 1.427 SOURCE1 560 0.0000 0.0000 --- 332,337 ---- *************** *** 368,374 **** ce-sx 239.7 1.797 SOURCE3 5 0.0080 0.0082 ce-sy 248.9 1.782 SOURCE3 5 0.0105 0.0114 cf-cf 390.5 1.451 SOURCE1 66 0.0060 0.0060 - cf-cf 562.4 1.338 SOURCE1 543 same as ce-cf cf-cg 415.6 1.431 SOURCE1 22 0.0000 0.0000 cf-ch 415.6 1.431 SOURCE1 22 0.0000 0.0000 cf-ha 341.5 1.089 SOURCE3 55 0.0030 0.0056 --- 366,371 ---- *************** *** 389,395 **** cg-ne 450.5 1.363 SOURCE3 4 0.0189 0.0204 cg-pe 429.8 1.621 SOURCE3 11 0.1928 0.2008 ch-ch 494.2 1.377 SOURCE1 42 0.0000 0.0000 - ch-ch 949.5 1.191 SOURCE1 80 same as cg-ch ch-n1 994.7 1.143 SOURCE1 316 0.0011 0.0018 ch-nf 450.5 1.363 SOURCE3 4 same as cg-ne ch-pf 429.8 1.621 SOURCE3 11 same as cg-pe --- 386,391 ---- *************** *** 538,544 **** n -sh 273.6 1.728 SOURCE3 4 0.0108 0.0128 n -ss 281.6 1.717 SOURCE3 7 0.0120 0.0133 n1-n1 1221.7 1.124 SOURCE1 19 0.0000 0.0000 - n1-n1 1365.7 1.100 SOURCE3 n1-n2 857.4 1.216 SOURCE1 19 0.0000 0.0000 n1-n3 535.7 1.350 SOURCE0 1 n1-n4 518.2 1.360 SOURCE0 1 --- 534,539 ---- *************** *** 650,656 **** nc-ss 433.5 1.560 SOURCE1 74 0.0000 0.0000 nc-sy 439.8 1.555 SOURCE3 2 nd-nd 486.8 1.379 SOURCE3 9 0.0145 0.0164 - nd-nd 602.9 1.315 SOURCE3 9 same as nc-nd nd-os 414.9 1.395 SOURCE1 46 0.0163 0.0188 nd-ss 433.5 1.560 SOURCE1 74 0.0000 0.0000 nd-sy 439.8 1.555 SOURCE3 2 --- 645,650 ---- *************** *** 665,671 **** ne-sx 207.3 1.838 SOURCE3 7 0.0760 0.1060 ne-sy 257.1 1.752 SOURCE3 7 0.0640 0.0814 nf-nf 355.3 1.479 SOURCE3 19 same as ne-ne - nf-nf 738.6 1.257 SOURCE3 1 same as ne-nf nf-o 736.4 1.228 SOURCE3 40 same as ne- o nf-p2 493.9 1.563 SOURCE3 14 same as ne-p2 nf-pf 327.8 1.712 SOURCE3 28 same as ne-pe --- 659,664 ---- *************** *** 786,792 **** pe-sx 145.9 2.168 SOURCE3 9 0.1092 0.1743 pe-sy 133.0 2.213 SOURCE3 6 0.0106 0.0127 pf-pf 240.7 2.092 SOURCE3 7 same as pe-pe - pf-pf 260.8 2.055 SOURCE3 1 same as pe-pf pf-px 291.4 2.005 SOURCE3 12 same as pe-px pf-py 278.6 2.025 SOURCE3 12 same as pe-py pf-s 374.7 1.758 SOURCE3 31 same as pe- s --- 779,784 ---- *************** *** 4224,4230 **** c1-n1-o 62.6 179.95 HF/6-31G* c1-n1-oh 62.9 174.31 HF/6-31G* c1-n1-os 62.2 176.61 HF/6-31G* ! c1-n1-p1 83.5 172.83 HF/6-31G* c1-n1-p3 68.7 173.51 HF/6-31G* c1-n1-p4 68.7 173.64 HF/6-31G* c1-n1-p5 71.5 177.28 HF/6-31G* --- 4216,4222 ---- c1-n1-o 62.6 179.95 HF/6-31G* c1-n1-oh 62.9 174.31 HF/6-31G* c1-n1-os 62.2 176.61 HF/6-31G* ! c1-n1-p2 83.5 172.83 HF/6-31G* c1-n1-p3 68.7 173.51 HF/6-31G* c1-n1-p4 68.7 173.64 HF/6-31G* c1-n1-p5 71.5 177.28 HF/6-31G* *************** *** 4234,4240 **** c1-n1-s6 61.8 175.92 HF/6-31G* c1-n1-sh 55.7 174.25 HF/6-31G* c1-n1-ss 55.4 176.06 HF/6-31G* - c1-ng-ng 51.9 179.97 HF/6-31G* c2-c1-n1 63.1 180.00 HF/6-31G* c2-c2-n1 71.7 122.98 HF/6-31G* c2-n1-n1 61.6 180.00 HF/6-31G* --- 4226,4231 ---- *************** *** 4272,4278 **** n1-n1-os 64.0 176.12 HF/6-31G* n1-n1-p2 69.4 174.71 HF/6-31G* n1-n1-p3 70.2 174.27 HF/6-31G* - n1-n1-s 54.6 179.96 HF/6-31G* n1-n1-sh 57.0 175.07 HF/6-31G* n1-n1-ss 56.9 175.61 HF/6-31G* n1-p4-o 49.7 114.59 HF/6-31G* --- 4263,4268 ---- *************** *** 4280,4286 **** n1-s2-o 73.1 108.46 HF/6-31G* n1-s4-o 70.2 110.09 HF/6-31G* n1-s6-o 78.8 107.52 HF/6-31G* - n1-c1-n1 70.2 180.00 HF/6-31G* n1-c2-n1 73.6 124.15 HF/6-31G* n1-c3-n1 80.0 105.07 HF/6-31G* n1-ca-n1 75.8 117.03 HF/6-31G* --- 4270,4275 ---- *************** *** 4323,4330 **** nh-c1-nh 59.0 180.00 Guess no-c1-no 56.8 180.00 Guess na-c1-na 58.6 180.00 Guess - na-c1-na 58.6 180.00 Guess - na-c1-na 58.6 180.00 Guess X -c -c -X 4 1.200 180.000 2.000 X -c -c1-X 2 0.000 180.000 2.000 --- 4312,4317 ---- *************** *** 4889,4895 **** X -p3-py-X 6 11.000 180.000 2.000 X -p3-sh-X 2 9.200 0.000 2.000 X -p3-ss-X 2 2.300 0.000 3.000 - X -p3-ss-X 2 2.300 0.000 3.000 X -p3-s4-X 4 15.400 0.000 2.000 X -p3-sx-X 4 15.400 0.000 2.000 X -p3-s6-X 6 1.600 0.000 3.000 --- 4876,4881 ---- *************** *** 5038,5044 **** c -c3-n -o 1.1 180. 2. Junmei et al.1999 c2-c2-na-c3 1.1 180. 2. c2-c -c2-c3 1.1 180. 2. - c3-o -c -oh 1.1 180. 2. c2-c3-c2-hc 1.1 180. 2. Junmei et al.1999 c2-c3-ca-hc 1.1 180. 2. Junmei et al.1999 c2-hc-c -o 1.1 180. 2. Junmei et al.1999 --- 5024,5029 ---- *************** *** 5061,5075 **** hc-o -c -oh 1.1 180. 2. Junmei et al.1999 hc-o -c -os 1.1 180. 2. n2-c2-ca-n2 1.1 180. 2. dac guess, 9/94 - n2-ca-ca-c3 1.1 180. 2. n2-ca-ca-n2 1.1 180. 2. dac guess, 9/94 - na-ca-ca-c3 1.1 180. 2. na-n2-ca-n2 1.1 180. 2. dac, 10/94 X -X -X -X 1.1 180. 2. dac, 10/94 hw ow 0000. 0000. 4. flag for fast water - n na n2 MOD4 RE h1 1.3870 0.0157 Veenstra et al JCC,8,(1992),963 --- 5046,5057 ---- ---------------------------------------------------------------------------- Temporary workaround: none. ********>Bugfix.29: Author: Ross Walker Date: 01/10/2005 Programs: ambpdb Description: ambpdb may give a segmentation fault on some machines when trying to convert restrt files to pdb files. This was due to some array out of bounds errors that were not tested for in the code. This patch file will replace the static memory allocation in ambpdb with dynamic memory allocation and at the same time fix the segmentation fault bug. For this bugfix to work you must have previously applied bugfix.11. Fix: apply the following patch to amber8/src/etc/ambpdb.f ------------------------------------------------------------------------------ --- src/etc/ambpdb.f 2004-01-05 12:50:49.000000000 -0800 +++ src/etc/ambpdb.f 2004-12-16 10:19:18.000000000 -0800 @@ -2,28 +2,21 @@ c Simple filter program to convert AMBER coordinate files into PDB files c (and to do other similar conversions). c - character*80 arg,prmtop,title - character*8 hbenec - character*6 arg1,arg2 - character*4 igraph,lbres - character*1 ftype - double precision c - integer access, fhybrid, fhbdon, fhbh, fhbacc, ntf, itf, jtf - double precision fhbene, hbene + implicit none + character(len=80) arg,prmtop,title + character(len=8) hbenec + character(len=6) arg1,arg2 + character(len=4), dimension(:), allocatable :: igraph,lbres + character(len=1), dimension(:), allocatable :: ftype + integer access, ntf, ioffset, iarg, indx, iargc, natom, nres + integer nbond, ier, kcform, idbl, j, nhb + character(len=4) ititl(20) + double precision hbene logical alttit,center,aatm,bres,ter,bin - parameter( MAXATOM=150000 ) - parameter( MAXRES=50000 ) - parameter( MAXFHB=50000 ) -C - DIMENSION C(3*MAXATOM),IGRAPH(3*MAXATOM),IPRES(MAXRES), - . LBRES(MAXRES),lastat(MAXRES) - DIMENSION ITITL(20),ib(MAXATOM),jb(MAXATOM),chg(MAXATOM) - DIMENSION FTYPE(MAXATOM), FHYBRID(MAXATOM) - DIMENSION FHBDON(MAXFHB), FHBH(MAXFHB), FHBACC(MAXFHB), - . FHBENE(MAXFHB) - DIMENSION itf(MAXATOM), jtf(MAXATOM) - dimension c3(3,1) - equivalence (c(1),c3(1,1)) +c + double precision, dimension(:), allocatable :: C,chg,fhbene + integer, dimension(:), allocatable :: IPRES,lastat,ib,jb,fhybrid, + . fhbdon,fhbh,fhbacc,itf,jtf c c ------ check argument options c @@ -87,6 +80,21 @@ C ----- OPEN THE PARM FILE AND LOAD THE NECESSARY STUFF ----- C call amopen(10,prmtop,'O','F','R') + CALL GETNAM0(NATOM,NRES,NBOND,10) + REWIND(UNIT=10) +c +c ------ Allocate memory: ------ +c + allocate( c(3*natom), igraph(natom), ipres(nres), lbres(nres), + . lastat(nres), ib(nbond), jb(nbond), chg(natom), + . ftype(natom), fhybrid(natom), fhbdon(natom),fhbh(natom), + . fhbacc(natom), fhbene(natom), itf(natom), jtf(natom), + . stat = ier) + if (ier /= 0 ) then + write(0,*) 'memory allocation failure' + call mexit(6,1) + end if +c CALL GETNAM(NATOM,NRES,IGRAPH,IPRES,LBRES,ITITL,10,1, 1 C,C,C,ib,jb,nbond,chg,lastat,ter) CLOSE(UNIT=10) @@ -103,14 +111,14 @@ . ib, jb, nbond, ftype) call gethybrid(NATOM, NRES, IGRAPH, IPRES, ib, jb, . nbond, c, fhybrid) - call findtf(MAXATOM, nbond, ib, jb, fhybrid, igraph, + call findtf(NATOM, nbond, ib, jb, fhybrid, igraph, . ntf, itf, jtf) - call corbondl(MAXATOM, NATOM, IGRAPH, NRES, IPRES, LBRES, + call corbondl(NATOM, NATOM, IGRAPH, NRES, IPRES, LBRES, . nbond, ib, jb, c) - call findhbond(MAXFHB, NATOM, NRES, IGRAPH, IPRES, ib, jb, + call findhbond(NATOM, NATOM, NRES, IGRAPH, IPRES, ib, jb, . nbond, c, ftype, fhybrid, . nhb, fhbdon, fhbh, fhbacc, fhbene) - call addtether(MAXFHB, MAXATOM, MAXRES, NATOM, NRES, + call addtether(NATOM, NATOM, NRES, NATOM, NRES, . IGRAPH, IPRES, LBRES, ib, jb, nbond, c, . ftype, fhybrid, . nhb, fhbdon, fhbh, fhbacc, fhbene) @@ -152,14 +160,40 @@ C C===================================================================== C + SUBROUTINE GETNAM0(NATOM,NRES,MBONA,NF) +c + CHARACTER*80 FMT,FMTIN,IFMT,AFMT,RFMT,TYPE + character(len=4) ITITL(20) + IFMT = '(12I6)' + AFMT = '(20A4)' + RFMT = '(5E16.8)' +C +C ----- READ THE MOLECULAR TOPOLOGY ----- +C + FMTIN = AFMT + TYPE = 'TITLE' + CALL NXTSEC(NF, 0, 0,FMTIN, TYPE, FMT, IOK) + READ(NF,FMT) (ITITL(I),I=1,20) +c + FMTIN = IFMT + TYPE = 'POINTERS' + CALL NXTSEC(NF, 6, 0,FMTIN, TYPE, FMT, IOK) + READ(NF,FMT) NATOM,NTYPES,NBONH,MBONA,NTHETH,MTHETA,NPHIH,MPHIA, + 1 NHPARM,NPARM,NNB,NRES + !---- fix for allocating bond arrays ------ + mbona = mbona+nbonh + + RETURN + END +C +C===================================================================== +C SUBROUTINE GETNAM(NATOM,NRES,IGRAPH,IPRES,LBRES,ITITL,NF,KPF, 1 X,IX,IH,ib,jb,nbond,chg,lastat,ter) - character*4 igraph,lbres + character(len=4) igraph,lbres,ititl logical ter - parameter( MAXATOM=150000 ) - parameter( MAXRES=50000 ) - DIMENSION IGRAPH(2),IPRES(2),LBRES(2),ITITL(20) - DIMENSION X(2),IX(2),IH(2),ib(*),jb(*),chg(*),lastat(*) + DIMENSION IGRAPH(*),IPRES(*),LBRES(*),ITITL(20) + DIMENSION X(*),IX(*),IH(*),ib(*),jb(*),chg(*),lastat(*) CHARACTER*80 FMT CHARACTER*80 FMTIN,IFMT,AFMT,RFMT,TYPE IFMT = '(12I6)' @@ -181,12 +215,6 @@ 1 NUMBND,NUMANG,NPTRA,NATYP,NPHB,IFPERT,NBPER,NGPER, 1 NDPER,MBPER,MGPER,MDPER,IFBOX,NMXRS,IFCAP C - if( NATOM.gt.MAXATOM .or. NRES.gt.MAXRES) then - write(6,*) 'NATOM or NRES is too big:' - write(6,*) ' NATOM = ',natom,'; max is ',MAXATOM - write(6,*) ' NRES = ',nres, '; max is ',MAXRES - stop - end if NTYPE = NTYPES*NTYPES C C ----- READ THE SYMBOLS AND THE CHARGES AND THE MASSES ----- @@ -349,8 +377,9 @@ character*3 resnam character*1 type, ftype character*40 title + character(len=4) ititl(20) logical alttit,center,aatm,bres - DIMENSION C(2),IGRAPH(2),IPRES(2),LBRES(2),ITITL(20),chg(*), + DIMENSION C(2),IGRAPH(2),IPRES(2),LBRES(2),chg(*), . lastat(*) DIMENSION ftype(*) dimension elrad(15) @@ -559,7 +588,8 @@ C SUBROUTINE GETCOR(bin,NATOM,C,CD,KCF,IDBL,NF) DOUBLE PRECISION C, CD - DIMENSION C(2),CD(2),ITITL(20) + character(len=4) ititl(20) + DIMENSION C(2),CD(2) integer fh character*80 line logical bin ------------------------------------------------------------------------------ Workarounds: Use carnal or ptraj for pdb files. ********>Bugfix.30: Author: Dave Case (reported by Karen Haskell) Date: 01/12/2005 Programs: antechamber Description: The bondtype program in src/antehcamber is a C++ program, and needs to be compiled with icpc (not icc) if you are using the Intel C compilers. This only affects people using that C compiler. Fix: apply the following patch to amber8/src/configure ------------------------------------------------------------------------------ *** src/configure 2004/04/21 18:38:41 1.226 --- src/configure 2005/01/13 02:12:35 *************** *** 394,400 **** foptflags="$fflags -O3 -IPF_fma -ip" cc=icc altcc=icc ! cplusplus=icc else fc=efc load="$fc $static_flag -Vaxlib" --- 394,400 ---- foptflags="$fflags -O3 -IPF_fma -ip" cc=icc altcc=icc ! cplusplus=icpc else fc=efc load="$fc $static_flag -Vaxlib" ------------------------------------------------------------------------------ Workarounds: none that would be easier than applying this patch ********>Bugfix.31: Author: Bob Duke Date: 01/21/2005 Programs: pmemd Description: If the DUMPAVE facility is requested, additional (redundant) information can be written by the non-master nodes, generally to a file named fort.35 (or similar). Fix: apply the following patch to amber8/src/pmemd/src/nmr_calls.f90 ------------------------------------------------------------------------------ *** src/pmemd/src/nmr_calls.f90 2004/02/16 21:32:57 1.3 --- src/pmemd/src/nmr_calls.f90 2005/01/21 17:14:31 *************** *** 3370,3375 **** --- 3370,3376 ---- #include "use_mdin_ctrl_dat.h" #include "use_nmr_lib.h" #include "use_prmtop_dat.h" + #include "use_parallel_dat.h" implicit none *************** *** 3467,3473 **** ! If incremental "dumps" of restraint values have been requested, ! and this is the first call to nmrnrg, open the appropriate file: ! if (ifirst .eq. 1 .and. iredir(6) .gt. 0) & call opnmrg(redir(6)(1:iredir(6)), idumpu, 0, iout, ierr) ! Zero the accumulators: --- 3468,3474 ---- ! If incremental "dumps" of restraint values have been requested, ! and this is the first call to nmrnrg, open the appropriate file: ! if (master .and. ifirst .eq. 1 .and. iredir(6) .gt. 0) & call opnmrg(redir(6)(1:iredir(6)), idumpu, 0, iout, ierr) ! Zero the accumulators: *************** *** 3636,3649 **** 12 continue ! if (idmpav .gt. 0) then ! if (mod(nstep, idmpav) .eq. 0) then ! if (i .eq. 1) write(idumpu, 9001) nstep ! convrt = 1.0d0 ! if (jtyp .ne. 1 .and. .not.jcoupl) convrt = 180.0d0/pi ! rbuff(mod(i - 1, ibfmax) + 1) = rint*convrt ! if (mod(i, ibfmax) .eq. 0) & ! write(idumpu, 9002) (rbuff(jj), jj = 1, ibfmax) end if end if --- 3637,3652 ---- 12 continue ! if (master) then ! if (idmpav .gt. 0) then ! if (mod(nstep, idmpav) .eq. 0) then ! if (i .eq. 1) write(idumpu, 9001) nstep ! convrt = 1.0d0 ! if (jtyp .ne. 1 .and. .not.jcoupl) convrt = 180.0d0/pi ! rbuff(mod(i - 1, ibfmax) + 1) = rint*convrt ! if (mod(i, ibfmax) .eq. 0) & ! write(idumpu, 9002) (rbuff(jj), jj = 1, ibfmax) ! end if end if end if *************** *** 3651,3660 **** ! Dump anything remaining in buffer: ! if (idmpav .gt. 0) then ! if (mod(nstep, idmpav) .eq. 0) then ! if (mod(nmrnum, ibfmax) .ne. 0) & ! write(idumpu, 9002) (rbuff(jj), jj = 1, mod(nmrnum, ibfmax)) end if end if --- 3654,3665 ---- ! Dump anything remaining in buffer: ! if (master) then ! if (idmpav .gt. 0) then ! if (mod(nstep, idmpav) .eq. 0) then ! if (mod(nmrnum, ibfmax) .ne. 0) & ! write(idumpu, 9002) (rbuff(jj), jj = 1, mod(nmrnum, ibfmax)) ! end if end if end if ------------------------------------------------------------------------------ Workarounds: none. ********>Bugfix.32: Author: Dave Case Date: 02/10/2005 Programs: sander Description: When ntp=0, (so that pressure is not being regulated) the value printed for the pressure in the mden has no real meaning, and can even be formatted incorrectly. Fix: apply the following patch to amber8/src/sander/runmd.f ------------------------------------------------------------------------------ *** src/sander/runmd.f 2004/11/30 02:31:24 7.259 --- src/sander/runmd.f 2005/01/29 01:13:42 *************** *** 141,147 **** logical ixdump,ivarch,itdump logical qsetup ! equivalence (scaltp,ener(5)),(vol,ener(10)) equivalence (pres(1),ener(11)),(ekcmt(1),ener(15)) equivalence (vir(1),ener(19)) integer nvalid --- 141,147 ---- logical ixdump,ivarch,itdump logical qsetup ! equivalence (vol,ener(10)) equivalence (pres(1),ener(11)),(ekcmt(1),ener(15)) equivalence (vir(1),ener(19)) integer nvalid ------------------------------------------------------------------------------ Workarounds: none. ********>Bugfix.33: Author: Dave Case Date: 02/10/2005 Programs: sander Description: When the cap water option is requested, there is no energy computed to go along with the force being applied. This can lead to an apparent lack of energy conservation. Fix: apply the following patch to amber8/src/sander/{ene.f,force.f} ------------------------------------------------------------------------------ *** src/sander/ene.f 2004/03/01 15:17:37 7.71 --- src/sander/ene.f 2005/02/10 22:10:24 *************** *** 1028,1034 **** !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !+ [Enter a one-line description of subroutine capwat here] ! subroutine capwat(nat,x,f) implicit _REAL_ (a-h,o-z) #ifdef MPI --- 1028,1034 ---- !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ !+ [Enter a one-line description of subroutine capwat here] ! subroutine capwat(nat,x,f,ecap) implicit _REAL_ (a-h,o-z) #ifdef MPI *************** *** 1042,1047 **** --- 1042,1049 ---- dimension x(3,*),f(3,*) data tm34,zero/1.0d-34,0.0d0/ + ecap = 0.d0 + ! FLOW CONTROL FLAG (debug) if ( do_cap == 0 )return #ifdef MPI *************** *** 1054,1060 **** ya = ycap-x(2,i) za = zcap-x(3,i) da = sqrt(xa*xa+ya*ya+za*za+tm34) ! df = fcap*max(zero,da-cutcap)/da f(1,i) = f(1,i)+df*xa f(2,i) = f(2,i)+df*ya f(3,i) = f(3,i)+df*za --- 1056,1064 ---- ya = ycap-x(2,i) za = zcap-x(3,i) da = sqrt(xa*xa+ya*ya+za*za+tm34) ! delta = max(zero,da-cutcap) ! ecap = ecap + 0.5*fcap*delta*delta ! df = fcap*delta/da f(1,i) = f(1,i)+df*xa f(2,i) = f(2,i)+df*ya f(3,i) = f(3,i)+df*za ------------------------------------------------------------------------------ *** src/sander/force.f 2004/03/09 00:59:15 7.172 --- src/sander/force.f 2005/02/10 22:10:34 *************** *** 63,69 **** _REAL_ r_stack(*) integer i_stack(*) ! _REAL_ enmr(3),devdis(4),devang(4),devtor(4),entr dimension itrp(3,nt_lim) _REAL_ x(*),f(*),ene(30),vir(*) --- 63,69 ---- _REAL_ r_stack(*) integer i_stack(*) ! _REAL_ enmr(3),devdis(4),devang(4),devtor(4),entr,ecap dimension itrp(3,nt_lim) _REAL_ x(*),f(*),ene(30),vir(*) *************** *** 524,530 **** end if ! if(ifcap > 0) call capwat(natom,x,f) #ifdef MPI if(mytaskid == 0)then --- 524,533 ---- end if ! if(ifcap > 0) then ! call capwat(natom,x,f,ecap) ! ene(20) = ene(20) + ecap ! end if #ifdef MPI if(mytaskid == 0)then *************** *** 725,731 **** ! ene(9): 1-4 electrostatics ! ene(10): constraint energy ! ene(11-19): used a scratch, but not needed further below ! ! ene(20): position constraint energy ! ene(21): charging free energy result ! ene(22): noe volume penalty ! ene(23): surface-area dependent energy --- 728,734 ---- ! ene(9): 1-4 electrostatics ! ene(10): constraint energy ! ene(11-19): used a scratch, but not needed further below ! ! ene(20): position constraint energy + cap energy ! ene(21): charging free energy result ! ene(22): noe volume penalty ! ene(23): surface-area dependent energy ------------------------------------------------------------------------------ Workarounds: Don't worry, be happy....Amber has been like this forever. ********>Bugfix.34: Author: Junmei Wang, (reported by Kazua Ohta) Date: 02/17/2005 Programs: prepgen Description: The NEWPDB.PDB file has residue numbers in the wrong column, and may not give correct results when OMIT_NAMES is requested. There was a conditional check that was written backwards. Fix: apply the following patch to amber8/src/antechamber.prepgen.c ------------------------------------------------------------------------------ *** src/antechamber/prepgen.c 2004/02/02 21:46:47 1.24 --- src/antechamber/prepgen.c 2005/02/17 15:46:47 1.25 *************** *** 712,718 **** if (seq1[j] == i) seq2[i] = j; for (i = 0; i < atomnum; i++) ! fprintf(fppdb, "%4s%7d %-4s%3s%6d%12.3f%8.3f%8.3f%10.5f\n", "ATOM", i + 1, newatom[i + 3].name, minfo.resname, 1, newatom[i + 3].x, newatom[i + 3].y, newatom[i + 3].z, newatom[i + 3].charge); --- 712,718 ---- if (seq1[j] == i) seq2[i] = j; for (i = 0; i < atomnum; i++) ! fprintf(fppdb, "%4s%7d %-4s%-4s%5d%12.3f%8.3f%8.3f%10.6f\n", "ATOM", i + 1, newatom[i + 3].name, minfo.resname, 1, newatom[i + 3].x, newatom[i + 3].y, newatom[i + 3].z, newatom[i + 3].charge); *************** *** 1024,1030 **** adjustid(); /*adjust headno, tailno, mainatom etc */ } ! if (omitnum > 0 && charge >= 9990.) { pcharge = 0.0; ncharge = 0.0; for (i = 0; i < atomnum; i++) { --- 1024,1030 ---- adjustid(); /*adjust headno, tailno, mainatom etc */ } ! if (omitnum > 0 && charge <= 9990.) { pcharge = 0.0; ncharge = 0.0; for (i = 0; i < atomnum; i++) { ------------------------------------------------------------------------------ Workarounds: none ********>Bugfix.35: Author: Bob Duke Date: 02/23/2005 Programs: pmemd Description: The Portland Group compiler is picky about variable declarations. Fix: apply the following patch to amber8/src/pmemd/src/nmr_calls.f90 ------------------------------------------------------------------------------ *** src/pmemd/src/nmr_calls.f90 2005/01/21 17:15:08 1.4 --- src/pmemd/src/nmr_calls.f90 2005/02/23 15:48:19 *************** *** 3428,3434 **** double precision e integer i integer iave ! integer ierr integer ifirst integer incflg(3) integer inum(3) --- 3428,3434 ---- double precision e integer i integer iave ! integer ierr_nmr integer ifirst integer incflg(3) integer inum(3) *************** *** 3469,3475 **** ! and this is the first call to nmrnrg, open the appropriate file: if (master .and. ifirst .eq. 1 .and. iredir(6) .gt. 0) & ! call opnmrg(redir(6)(1:iredir(6)), idumpu, 0, iout, ierr) ! Zero the accumulators: --- 3469,3475 ---- ! and this is the first call to nmrnrg, open the appropriate file: if (master .and. ifirst .eq. 1 .and. iredir(6) .gt. 0) & ! call opnmrg(redir(6)(1:iredir(6)), idumpu, 0, iout, ierr_nmr) ! Zero the accumulators: ------------------------------------------------------------------------------ Workarounds: none ********>Bugfix.36: Author: Dave Case (reported by Adriano Martinelli) Date: 02/24/2005 Programs: nmode Description: When we converted the code to free-format, some data statements for keywords for "rgroup" were converted from upper to lower case Fix: apply the following patch to amber8/src/nmode/rgroup.f ------------------------------------------------------------------------------ *** src/nmode/rgroup.f 2003/12/10 22:16:29 7.2 --- src/nmode/rgroup.f 2005/02/24 16:24:15 *************** *** 34,45 **** data ifld/ 2*0, 13*2 , 5*0 / data jfld/ 4*1, 16*0 / ! data infin /4hnfin/ ! data ifind /4hfind/ ! data iatom /4hatom/ ! data ires /4hres / ! data iiend /4hend / ! data ksear /4hsear/ ngrp = 0 if (konst) then --- 34,45 ---- data ifld/ 2*0, 13*2 , 5*0 / data jfld/ 4*1, 16*0 / ! data infin /4HNFIN/ ! data ifind /4HFIND/ ! data iatom /4HATOM/ ! data ires /4HRES / ! data iiend /4HEND / ! data ksear /4HSEAR/ ngrp = 0 if (konst) then ------------------------------------------------------------------------------ Workarounds: Use the lower case keywords in your input file ********>Bugfix.37: Author: Ross Walker (reported by Mark Williamson) Date: 02/28/2005 Programs: Sander and Sander.LES (mpi versions) Description: The targeted MD test case only has two residues and so is not really suitable for running in parallel since sander requires nres>nproc. The failure of this test case can lead to the mistaken opinion that the sander installation did not work. This bugfix ensures that this test case is only run for single cpu tests. Fix: apply the following patch to amber8/test/tgtmd/change_target.ntr/Run.tgtmd ------------------------------------------------------------------------------ --- test/tgtmd/change_target.ntr/Run.tgtmd 2005-02-28 14:33:36.000000000 -0800 +++ test/tgtmd/change_target.ntr/Run.tgtmd 2005-02-28 14:33:18.000000000 -0800 @@ -10,6 +10,10 @@ if( ! $?DO_PARALLEL ) then setenv DO_PARALLEL " " +else + echo "This test not set up for parallel" + echo "need #nres>#nproc" + exit 0 endif touch dummy ------------------------------------------------------------------------------ Workarounds: Manually comment this test out of the amber8/test/Makefile when testing a parallel implementation. ********>Bugfix.38: Author: Bob Duke Date: 02/28/2005 Programs: pmemd Description: Some compilers (like pathscale and g95) add a second underscore to routines that already have an underscore in their name. This adds a fix for that for pmemd. Fix: apply the following patch to amber8/src/pmemd/src/pmemd_clib.c ------------------------------------------------------------------------------ *** src/pmemd/src/pmemd_clib.c 2004/02/12 13:21:38 1.2 --- src/pmemd/src/pmemd_clib.c 2005/02/28 22:58:09 *************** *** 9,17 **** --- 9,22 ---- #ifdef NO_C_UNDERSCORE get_bytesize(void * start, void * end, int * bytes) #else + /* DBL_C_UNDERSCORE for pathscale */ + #ifdef DBL_C_UNDERSCORE + get_bytesize__(void * start, void * end, int * bytes) + #else get_bytesize_(void * start, void * end, int * bytes) #endif #endif + #endif { *bytes = ((char *)end - (char *)start); } *************** *** 24,30 **** --- 29,40 ---- #ifdef NO_C_UNDERSCORE get_wall_time(int * sec, int * usec) #else + /* DBL_C_UNDERSCORE for pathscale */ + #ifdef DBL_C_UNDERSCORE + get_wall_time__(int * sec, int * usec) + #else get_wall_time_(int * sec, int * usec) + #endif #endif #endif { ------------------------------------------------------------------------------ Workarounds: None ********>Bugfix 39: Authors: Dave Case and Scott Brozell (reported by Joe Nolan) Date: 02/28/2005 Programs: xleap Description: the configure sparc and SunOS compiler/architectures do not produce a functional xleap because the m4 macro processor push-back buffer is too small. Fix: apply the following patch to amber8/src/configure ------------------------------------------------------------------------------ *** src/configure 21 Apr 2004 18:38:41 -0000 1.226 --- src/configure 2 Mar 2005 07:19:15 -0000 *************** *** 913,918 **** --- 913,919 ---- loadcc="$cc $static_flag" cflags="$cflags -DSYSV " freeformat_flag='-free' + m4='m4 -B50000' loadptraj="$load" ;; ------------------------------------------------------------------------------ Temporary workarounds: use tleap. ********>Bugfix.40: Author: Dave Case Date: 03/17/2005 Programs: sander.QMMM Description: When the cap water option is requested, there is no energy computed to go along with the force being applied. This can lead to an apparent lack of energy conservation. Fix: apply the following patch to amber8/src/sander/forcecp.f ------------------------------------------------------------------------------ *** src/sander/forcecp.f 2004/02/17 17:19:07 7.13 --- src/sander/forcecp.f 2005/03/17 16:45:52 *************** *** 53,59 **** logical do_list_update _REAL_ r_stack(*) ! _REAL_ enmr(3),devdis(4),devang(4),devtor(4),entr dimension itrp(3,nt_lim) _REAL_ x(*),f(*),ene(30),ener(*),vir(*) --- 53,59 ---- logical do_list_update _REAL_ r_stack(*) ! _REAL_ enmr(3),devdis(4),devang(4),devtor(4),entr,ecap dimension itrp(3,nt_lim) _REAL_ x(*),f(*),ene(30),ener(*),vir(*) *************** *** 315,321 **** ! ----- CALCULATE THE CAP FORCE IF NECESSARY ----- ! if(ifcap > 0) call capwat(natom,x,f) vir(1) = vir(1)+0.5d0*molvir(1,1) vir(2) = vir(2)+0.5d0*molvir(2,2) vir(3) = vir(3)+0.5d0*molvir(3,3) --- 315,324 ---- ! ----- CALCULATE THE CAP FORCE IF NECESSARY ----- ! if(ifcap > 0) then ! call capwat(natom,x,f,ecap) ! ene(20) = ene(20) + ecap ! end if vir(1) = vir(1)+0.5d0*molvir(1,1) vir(2) = vir(2)+0.5d0*molvir(2,2) vir(3) = vir(3)+0.5d0*molvir(3,3) ------------------------------------------------------------------------------ Workarounds: Don't worry, be happy....Amber has been like this forever. ********>Bugfix.41: Author: Dave Case (reported by David Mobley) Date: 03/18/2005 Programs: tleap Description: When a "set pertType " command is given in tleap, the code should also update the PERTURBED flag for that atom (based on whether or not the Type and pertType strings are the same). Because of an incorrect test for gibbs compatibility, this is not being done. (The corresponding code for the table editor in xleap is correct.) Fix: apply the following patch to amber8/src/leap/src/leap/atom.c ------------------------------------------------------------------------------ *** src/leap/src/leap/atom.c 2004/03/05 22:19:04 7.20 --- src/leap/src/leap/atom.c 2005/03/18 19:33:06 *************** *** 1029,1035 **** AtomSetPertType( aAtom, "" ); } else if ( !bObjektWarnType( oAttr, OSTRINGid ) ) return; AtomSetPertType( aAtom, sOString(oAttr) ); ! if( GDefaults.iGibbs ){ if( strcmp( sAtomType( aAtom ), sAtomPertType( aAtom ))){ AtomSetFlags( aAtom, ATOMPERTURB ); } else { --- 1029,1035 ---- AtomSetPertType( aAtom, "" ); } else if ( !bObjektWarnType( oAttr, OSTRINGid ) ) return; AtomSetPertType( aAtom, sOString(oAttr) ); ! if( !GDefaults.iGibbs ){ if( strcmp( sAtomType( aAtom ), sAtomPertType( aAtom ))){ AtomSetFlags( aAtom, ATOMPERTURB ); } else { ------------------------------------------------------------------------------ Workarounds: You can set the PERTURBED flag with an undocumented tleap command, but it is almost certainly better to apply this patch. ********>Bugfix 42: Author: Ross Walker and Mike Crowley Date: 03/29/2005 Programs: tleap, xleap Description: The bond command used to use # for triple bonds but some machines treated # as a prefix to a comment in leap resulting in it being impossible to create a triple bond. This bugfix replaces the -, =, #, : options to the bond command with more obvious S,D,T,A options which specify single, double, triple and aromatic bonds respectively. This set of options should work on all architectures. Check the manual errata page for updates to the leap manual arising from this bugfix. Fix: Apply the following patch to $AMBERHOME/src/leap/src/leap/commands.c $AMBERHOME/src/leap/src/leap/helptext.text ------------------------------------------------------------------------------ --- src/leap/src/leap/commands.c 2005-03-29 15:44:32.000000000 -0800 +++ src/leap/src/leap/commands.c 2005-03-29 15:44:17.000000000 -0800 @@ -1163,7 +1163,7 @@ char *sCmd = "bond"; if ( iArgCount == 2 ) { - cOrder = '-'; + cOrder = 'S'; if ( !bCmdGoodArguments( sCmd, iArgCount, aaArgs, "a a" ) ) { VP0(( "usage: bond [order]\n" )); return(NULL); @@ -1182,20 +1182,20 @@ aB = (ATOM)oAssocObject(aaArgs[1]); switch ( cOrder ) { - case '-': + case 'S': iOrder = BONDSINGLE; break; - case '=': + case 'D': iOrder = BONDDOUBLE; break; - case '#': + case 'T': iOrder = BONDTRIPLE; break; - case ':': + case 'A': iOrder = BONDAROMATIC; break; default: - VP0(( "%s: Illegal bond order, no bond made.\n", sCmd )); + VP0(( "%s: Unknown bond order, no bond made.\n Valid bond orders are: S, D, T or A\n", sCmd )); goto DONE; } AtomBondToOrder( aA, aB, iOrder ); --- src/leap/src/leap/helptext.text 2005-03-29 15:44:32.000000000 -0800 +++ src/leap/src/leap/helptext.text 2005-03-29 15:44:24.000000000 -0800 @@ -264,7 +264,7 @@ Create a bond between _atom1_ and _atom2_. Both of these ATOMs must be contained by the same UNIT. By default, the bond will be a single -bond. By specifying "-", "=", "#", or ":" as the optional argument +bond. By specifying "S", "D", "T", or "A" as the optional argument _order_ the user can specify a single, double, triple, or aromatic bond. ------------------------------------------------------------------------------ Temporary workarounds: avoid needing to create triple bonds in leap. ********>Bugfix 43: Author: Dave Case Date: 04/19/2005 Programs: sander Description: The output of one of the test cases was not updated to reflect the changes caused by bugfix.33. Fix: Apply the following patch to $AMBERHOME/test/nonper/mdout.cap.save ------------------------------------------------------------------------------ *** test/nonper/mdout.cap.save 2004/01/24 01:06:11 1.17 --- test/nonper/mdout.cap.save 2005/04/19 15:03:57 1.18 *************** *** 129,209 **** --------------------------------------------------- eedmeth=4: Setting switch to one everywhere ! --------------------------------------------------- Building list: 0 steps since previous list build. | Local SIZE OF NONBOND LIST = 1571562 | TOTAL SIZE OF NONBOND LIST = 1571562 NSTEP = 1 TIME(PS) = 4.002 TEMP(K) = 317.42 PRESS = 0.0 ! Etot = -3409.9453 EKtot = 2056.0343 EPtot = -5465.9796 BOND = 147.3094 ANGLE = 464.1439 DIHED = 413.8301 1-4 NB = 218.8979 1-4 EEL = 3459.2158 VDWAALS = 393.7375 ! EELEC = -10563.1142 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 2 TIME(PS) = 4.004 TEMP(K) = 317.89 PRESS = 0.0 ! Etot = -3123.6124 EKtot = 2059.0258 EPtot = -5182.6382 BOND = 149.3183 ANGLE = 462.3269 DIHED = 411.6598 1-4 NB = 217.5693 1-4 EEL = 3458.1943 VDWAALS = 396.5291 ! EELEC = -10278.2360 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 3 TIME(PS) = 4.006 TEMP(K) = 318.45 PRESS = 0.0 ! Etot = -2528.5047 EKtot = 2062.6979 EPtot = -4591.2026 BOND = 154.2724 ANGLE = 458.1540 DIHED = 409.7538 1-4 NB = 216.4012 1-4 EEL = 3455.6058 VDWAALS = 398.5538 ! EELEC = -9683.9435 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 4 TIME(PS) = 4.008 TEMP(K) = 318.82 PRESS = 0.0 ! Etot = -2632.0275 EKtot = 2065.0507 EPtot = -4697.0781 BOND = 161.6466 ANGLE = 455.5082 DIHED = 408.7298 1-4 NB = 215.4566 1-4 EEL = 3452.2657 VDWAALS = 399.6555 ! EELEC = -9790.3406 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 5 TIME(PS) = 4.010 TEMP(K) = 319.14 PRESS = 0.0 ! Etot = -2212.6180 EKtot = 2067.1602 EPtot = -4279.7782 BOND = 167.9908 ANGLE = 455.5692 DIHED = 408.6553 1-4 NB = 214.7678 1-4 EEL = 3448.9252 VDWAALS = 400.1675 ! EELEC = -9375.8541 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 6 TIME(PS) = 4.012 TEMP(K) = 319.88 PRESS = 0.0 ! Etot = -2169.0050 EKtot = 2071.9568 EPtot = -4240.9618 BOND = 169.6594 ANGLE = 456.2291 DIHED = 409.1788 1-4 NB = 214.3992 1-4 EEL = 3446.2793 VDWAALS = 400.4213 ! EELEC = -9337.1289 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 7 TIME(PS) = 4.014 TEMP(K) = 320.95 PRESS = 0.0 ! Etot = -2262.0104 EKtot = 2078.8740 EPtot = -4340.8844 BOND = 166.8745 ANGLE = 455.2731 DIHED = 409.9817 1-4 NB = 214.4714 1-4 EEL = 3444.7230 VDWAALS = 400.3908 ! EELEC = -9432.5989 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 8 TIME(PS) = 4.016 TEMP(K) = 321.25 PRESS = 0.0 ! Etot = -2203.8057 EKtot = 2080.8099 EPtot = -4284.6156 BOND = 164.1768 ANGLE = 453.4067 DIHED = 411.0656 1-4 NB = 214.9906 1-4 EEL = 3444.2409 VDWAALS = 399.9285 ! EELEC = -9372.4246 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 9 TIME(PS) = 4.018 TEMP(K) = 319.88 PRESS = 0.0 ! Etot = -2395.9516 EKtot = 2071.9637 EPtot = -4467.9154 BOND = 165.7324 ANGLE = 453.2604 DIHED = 412.7197 1-4 NB = 215.7663 1-4 EEL = 3444.2575 VDWAALS = 399.1144 ! EELEC = -9558.7661 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ List Build Triggered: Number of atoms triggering = 2 --- 129,218 ---- --------------------------------------------------- eedmeth=4: Setting switch to one everywhere ! --------------------------------------------------- Building list: 0 steps since previous list build. | Local SIZE OF NONBOND LIST = 1571562 | TOTAL SIZE OF NONBOND LIST = 1571562 NSTEP = 1 TIME(PS) = 4.002 TEMP(K) = 317.42 PRESS = 0.0 ! Etot = -3404.4787 EKtot = 2056.0343 EPtot = -5460.5130 BOND = 147.3094 ANGLE = 464.1439 DIHED = 413.8301 1-4 NB = 218.8979 1-4 EEL = 3459.2158 VDWAALS = 393.7375 ! EELEC = -10563.1142 EHBOND = 0.0000 RESTRAINT = 5.4666 ! EAMBER (non-restraint) = -5465.9796 ------------------------------------------------------------------------------ NSTEP = 2 TIME(PS) = 4.004 TEMP(K) = 317.89 PRESS = 0.0 ! Etot = -3118.1049 EKtot = 2059.0258 EPtot = -5177.1307 BOND = 149.3183 ANGLE = 462.3269 DIHED = 411.6598 1-4 NB = 217.5693 1-4 EEL = 3458.1943 VDWAALS = 396.5291 ! EELEC = -10278.2360 EHBOND = 0.0000 RESTRAINT = 5.5075 ! EAMBER (non-restraint) = -5182.6382 ------------------------------------------------------------------------------ NSTEP = 3 TIME(PS) = 4.006 TEMP(K) = 318.45 PRESS = 0.0 ! Etot = -2522.9589 EKtot = 2062.6979 EPtot = -4585.6568 BOND = 154.2724 ANGLE = 458.1540 DIHED = 409.7538 1-4 NB = 216.4012 1-4 EEL = 3455.6058 VDWAALS = 398.5538 ! EELEC = -9683.9435 EHBOND = 0.0000 RESTRAINT = 5.5458 ! EAMBER (non-restraint) = -4591.2026 ------------------------------------------------------------------------------ NSTEP = 4 TIME(PS) = 4.008 TEMP(K) = 318.82 PRESS = 0.0 ! Etot = -2626.4425 EKtot = 2065.0507 EPtot = -4691.4932 BOND = 161.6466 ANGLE = 455.5082 DIHED = 408.7298 1-4 NB = 215.4566 1-4 EEL = 3452.2657 VDWAALS = 399.6555 ! EELEC = -9790.3406 EHBOND = 0.0000 RESTRAINT = 5.5849 ! EAMBER (non-restraint) = -4697.0781 ------------------------------------------------------------------------------ NSTEP = 5 TIME(PS) = 4.010 TEMP(K) = 319.14 PRESS = 0.0 ! Etot = -2206.9886 EKtot = 2067.1602 EPtot = -4274.1488 BOND = 167.9908 ANGLE = 455.5692 DIHED = 408.6553 1-4 NB = 214.7678 1-4 EEL = 3448.9252 VDWAALS = 400.1675 ! EELEC = -9375.8541 EHBOND = 0.0000 RESTRAINT = 5.6294 ! EAMBER (non-restraint) = -4279.7782 ------------------------------------------------------------------------------ NSTEP = 6 TIME(PS) = 4.012 TEMP(K) = 319.88 PRESS = 0.0 ! Etot = -2163.3249 EKtot = 2071.9568 EPtot = -4235.2817 BOND = 169.6594 ANGLE = 456.2291 DIHED = 409.1788 1-4 NB = 214.3992 1-4 EEL = 3446.2793 VDWAALS = 400.4213 ! EELEC = -9337.1289 EHBOND = 0.0000 RESTRAINT = 5.6801 ! EAMBER (non-restraint) = -4240.9618 ------------------------------------------------------------------------------ NSTEP = 7 TIME(PS) = 4.014 TEMP(K) = 320.95 PRESS = 0.0 ! Etot = -2256.2752 EKtot = 2078.8740 EPtot = -4335.1492 BOND = 166.8745 ANGLE = 455.2731 DIHED = 409.9817 1-4 NB = 214.4714 1-4 EEL = 3444.7230 VDWAALS = 400.3908 ! EELEC = -9432.5989 EHBOND = 0.0000 RESTRAINT = 5.7352 ! EAMBER (non-restraint) = -4340.8844 ------------------------------------------------------------------------------ NSTEP = 8 TIME(PS) = 4.016 TEMP(K) = 321.25 PRESS = 0.0 ! Etot = -2198.0108 EKtot = 2080.8099 EPtot = -4278.8206 BOND = 164.1768 ANGLE = 453.4067 DIHED = 411.0656 1-4 NB = 214.9906 1-4 EEL = 3444.2409 VDWAALS = 399.9285 ! EELEC = -9372.4246 EHBOND = 0.0000 RESTRAINT = 5.7949 ! EAMBER (non-restraint) = -4284.6156 ------------------------------------------------------------------------------ NSTEP = 9 TIME(PS) = 4.018 TEMP(K) = 319.88 PRESS = 0.0 ! Etot = -2390.0945 EKtot = 2071.9637 EPtot = -4462.0582 BOND = 165.7324 ANGLE = 453.2604 DIHED = 412.7197 1-4 NB = 215.7663 1-4 EEL = 3444.2575 VDWAALS = 399.1144 ! EELEC = -9558.7661 EHBOND = 0.0000 RESTRAINT = 5.8572 ! EAMBER (non-restraint) = -4467.9154 ------------------------------------------------------------------------------ List Build Triggered: Number of atoms triggering = 2 *************** *** 213,222 **** | TOTAL SIZE OF NONBOND LIST = 1571719 NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 317.13 PRESS = 0.0 ! Etot = -2540.8014 EKtot = 2054.1400 EPtot = -4594.9413 BOND = 170.7752 ANGLE = 455.7520 DIHED = 415.1176 1-4 NB = 216.5013 1-4 EEL = 3443.8607 VDWAALS = 398.0380 ! EELEC = -9694.9860 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ --- 222,232 ---- | TOTAL SIZE OF NONBOND LIST = 1571719 NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 317.13 PRESS = 0.0 ! Etot = -2534.8800 EKtot = 2054.1400 EPtot = -4589.0200 BOND = 170.7752 ANGLE = 455.7520 DIHED = 415.1176 1-4 NB = 216.5013 1-4 EEL = 3443.8607 VDWAALS = 398.0380 ! EELEC = -9694.9860 EHBOND = 0.0000 RESTRAINT = 5.9213 ! EAMBER (non-restraint) = -4594.9413 ------------------------------------------------------------------------------ *************** *** 224,233 **** NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 319.08 PRESS = 0.0 ! Etot = -2547.8282 EKtot = 2066.7713 EPtot = -4614.5995 BOND = 161.7756 ANGLE = 456.9623 DIHED = 411.0692 1-4 NB = 215.9222 1-4 EEL = 3449.7568 VDWAALS = 398.6537 ! EELEC = -9708.7393 EHBOND = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ --- 234,244 ---- NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 319.08 PRESS = 0.0 ! Etot = -2542.1559 EKtot = 2066.7713 EPtot = -4608.9272 BOND = 161.7756 ANGLE = 456.9623 DIHED = 411.0692 1-4 NB = 215.9222 1-4 EEL = 3449.7568 VDWAALS = 398.6537 ! EELEC = -9708.7393 EHBOND = 0.0000 RESTRAINT = 5.6723 ! EAMBER (non-restraint) = -4614.5995 ------------------------------------------------------------------------------ *************** *** 235,245 **** NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 1.34 PRESS = 0.0 ! Etot = 395.1289 EKtot = 8.6714 EPtot = 388.8816 BOND = 8.0621 ANGLE = 3.4210 DIHED = 2.1183 1-4 NB = 1.3784 1-4 EEL = 5.7856 VDWAALS = 2.0087 ! EELEC = 390.1930 EHBOND = 0.0000 RESTRAINT = 0.0000 ! |E(PBS) = 395.2894 ------------------------------------------------------------------------------ --- 246,257 ---- NSTEP = 10 TIME(PS) = 4.020 TEMP(K) = 1.34 PRESS = 0.0 ! Etot = 395.2189 EKtot = 8.6714 EPtot = 388.9719 BOND = 8.0621 ANGLE = 3.4210 DIHED = 2.1183 1-4 NB = 1.3784 1-4 EEL = 5.7856 VDWAALS = 2.0087 ! EELEC = 390.1930 EHBOND = 0.0000 RESTRAINT = 0.1450 ! EAMBER (non-restraint) = 388.8269 ! |E(PBS) = 395.3795 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 44: Author: Scott Brozell Date: 05/20/2005 Programs: LEaP Description: tleap and xleap may cause a segmentation fault when loading a prep file containing LOOP bonds between atoms of type dummy. Fix: apply the following patch to amber8/src/leap/src/leap/amber.c ------------------------------------------------------------------------------ *** src/leap/src/leap/amber.c 29 Apr 2002 16:48:37 -0000 7.17 --- src/leap/src/leap/amber.c 21 May 2005 06:51:33 -0000 *************** *** 1189,1194 **** --- 1189,1199 ---- aMain1 = aAtom; } } + else { + if ( strncmp( sName, "DUMM", 4 ) != 0 ) { + VP0(( "Entry of type DUmmy; atom %s not created\n", sName )); + } + } cPCoor->aAtom = aAtom; iIndex++; } *************** *** 1249,1260 **** aAtom2= (ATOM)cContainerFindName( (CONTAINER)rRes, ATOMid, saStr[2] ); if ( aAtom == NULL ) { ! VP0(( "** LOOP atom %s not found\n", saStr[1] )); problem++; } if ( aAtom2 == NULL ) { ! VP0(( "** LOOP atom %s not found\n", saStr[2] )); problem++; } if (bAtomBondedTo(aAtom, aAtom2)) { VP0(( "%s: LOOP: redundant bond %s--%s ignored\n", --- 1254,1269 ---- aAtom2= (ATOM)cContainerFindName( (CONTAINER)rRes, ATOMid, saStr[2] ); if ( aAtom == NULL ) { ! VP0(( "** LOOP atom %s not found - bond not formed\n", ! saStr[1] )); problem++; + continue; } if ( aAtom2 == NULL ) { ! VP0(( "** LOOP atom %s not found - bond not formed\n", ! saStr[2] )); problem++; + continue; } if (bAtomBondedTo(aAtom, aAtom2)) { VP0(( "%s: LOOP: redundant bond %s--%s ignored\n", ------------------------------------------------------------------------------ Workarounds: Verify the LOOP bonds. Correct the dummy types of the non-dummy atoms; this may be accomplished in several ways. One way is by using a file format other than the prep file format. For example, the mol2 file format is apt for a single residue. antechamber can convert between formats, e.g.: antechamber -i input_file -fi prepi -o output_file -fo mol2 ********>Bugfix 45: Author: Dave Case Date: 06/29/2005 Programs: sander Description: The output of one of the test cases was not updated to reflect the changes caused by bugfix.33. Fix: Apply the following patch to $AMBERHOME/test/pb_pgb/mdout.pbpgb.save ------------------------------------------------------------------------------ *** test/pb_pgb/mdout.pbpgb.save 2004/03/01 22:22:42 1.7 --- test/pb_pgb/mdout.pbpgb.save 2005/06/29 16:07:18 *************** *** 117,198 **** NSTEP = 1 TIME(PS) = 4.001 TEMP(K) = 298.86 PRESS = 0.0 ! Etot = -14371.5201 EKtot = 3870.9870 EPtot = -18242.5071 BOND = 88.3363 ANGLE = 277.6019 DIHED = 316.0071 1-4 NB = 199.4596 1-4 EEL = 3059.3939 VDWAALS = 2098.1626 ! EELEC = -24281.4685 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 2 TIME(PS) = 4.002 TEMP(K) = 297.64 PRESS = 0.0 ! Etot = -14371.3557 EKtot = 3855.1841 EPtot = -18226.5398 BOND = 93.6077 ANGLE = 283.6668 DIHED = 317.3505 1-4 NB = 199.7168 1-4 EEL = 3058.8252 VDWAALS = 2097.7231 ! EELEC = -24277.4299 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 3 TIME(PS) = 4.003 TEMP(K) = 296.91 PRESS = 0.0 ! Etot = -14371.0657 EKtot = 3845.7886 EPtot = -18216.8542 BOND = 97.6180 ANGLE = 286.8598 DIHED = 318.5198 1-4 NB = 199.8164 1-4 EEL = 3057.9634 VDWAALS = 2097.0923 ! EELEC = -24274.7240 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 4 TIME(PS) = 4.004 TEMP(K) = 296.76 PRESS = 0.0 ! Etot = -14371.2605 EKtot = 3843.8455 EPtot = -18215.1060 BOND = 99.5595 ANGLE = 286.5915 DIHED = 319.3829 1-4 NB = 199.7427 1-4 EEL = 3056.7999 VDWAALS = 2096.2135 ! EELEC = -24273.3960 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 5 TIME(PS) = 4.005 TEMP(K) = 297.16 PRESS = 0.0 ! Etot = -14371.3474 EKtot = 3848.9511 EPtot = -18220.2985 BOND = 99.2020 ANGLE = 283.1707 DIHED = 319.8389 1-4 NB = 199.5079 1-4 EEL = 3055.3434 VDWAALS = 2095.0057 ! EELEC = -24272.3671 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 6 TIME(PS) = 4.006 TEMP(K) = 297.96 PRESS = 0.0 ! Etot = -14371.4557 EKtot = 3859.3314 EPtot = -18230.7872 BOND = 96.9481 ANGLE = 277.6425 DIHED = 319.8333 1-4 NB = 199.1482 1-4 EEL = 3053.6194 VDWAALS = 2093.6405 ! EELEC = -24271.6192 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 7 TIME(PS) = 4.007 TEMP(K) = 298.95 PRESS = 0.0 ! Etot = -14371.5396 EKtot = 3872.1405 EPtot = -18243.6801 BOND = 93.6798 ANGLE = 271.4535 DIHED = 319.3672 1-4 NB = 198.7150 1-4 EEL = 3051.6675 VDWAALS = 2092.0982 ! EELEC = -24270.6614 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 8 TIME(PS) = 4.008 TEMP(K) = 299.90 PRESS = 0.0 ! Etot = -14371.4401 EKtot = 3884.4149 EPtot = -18255.8550 BOND = 90.4635 ANGLE = 266.0539 DIHED = 318.4966 1-4 NB = 198.2636 1-4 EEL = 3049.5370 VDWAALS = 2090.4347 ! EELEC = -24269.1041 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 9 TIME(PS) = 4.009 TEMP(K) = 300.62 PRESS = 0.0 ! Etot = -14371.3442 EKtot = 3893.7656 EPtot = -18265.1098 BOND = 88.2150 ANGLE = 262.5344 DIHED = 317.3261 1-4 NB = 197.8414 1-4 EEL = 3047.2809 VDWAALS = 2088.7038 ! EELEC = -24267.0114 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 301.01 PRESS = 0.0 ! Etot = -14371.0865 EKtot = 3898.7752 EPtot = -18269.8617 BOND = 87.4510 ANGLE = 261.3871 DIHED = 315.9945 1-4 NB = 197.4781 1-4 EEL = 3044.9515 VDWAALS = 2086.9480 ! EELEC = -24264.0719 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ --- 117,208 ---- NSTEP = 1 TIME(PS) = 4.001 TEMP(K) = 298.86 PRESS = 0.0 ! Etot = -14329.6226 EKtot = 3870.9870 EPtot = -18200.6096 BOND = 88.3363 ANGLE = 277.6019 DIHED = 316.0071 1-4 NB = 199.4596 1-4 EEL = 3059.3939 VDWAALS = 2098.1626 ! EELEC = -24281.4685 EGB = 0.0000 RESTRAINT = 41.8975 ! EAMBER (non-restraint) = -18242.5071 ------------------------------------------------------------------------------ NSTEP = 2 TIME(PS) = 4.002 TEMP(K) = 297.64 PRESS = 0.0 ! Etot = -14329.7248 EKtot = 3855.1841 EPtot = -18184.9089 BOND = 93.6077 ANGLE = 283.6668 DIHED = 317.3505 1-4 NB = 199.7168 1-4 EEL = 3058.8252 VDWAALS = 2097.7231 ! EELEC = -24277.4299 EGB = 0.0000 RESTRAINT = 41.6310 ! EAMBER (non-restraint) = -18226.5398 ------------------------------------------------------------------------------ NSTEP = 3 TIME(PS) = 4.003 TEMP(K) = 296.91 PRESS = 0.0 ! Etot = -14329.6623 EKtot = 3845.7886 EPtot = -18175.4508 BOND = 97.6180 ANGLE = 286.8598 DIHED = 318.5198 1-4 NB = 199.8164 1-4 EEL = 3057.9634 VDWAALS = 2097.0923 ! EELEC = -24274.7240 EGB = 0.0000 RESTRAINT = 41.4034 ! EAMBER (non-restraint) = -18216.8542 ------------------------------------------------------------------------------ NSTEP = 4 TIME(PS) = 4.004 TEMP(K) = 296.76 PRESS = 0.0 ! Etot = -14330.0477 EKtot = 3843.8455 EPtot = -18173.8933 BOND = 99.5595 ANGLE = 286.5915 DIHED = 319.3829 1-4 NB = 199.7427 1-4 EEL = 3056.7999 VDWAALS = 2096.2135 ! EELEC = -24273.3960 EGB = 0.0000 RESTRAINT = 41.2128 ! EAMBER (non-restraint) = -18215.1060 ------------------------------------------------------------------------------ NSTEP = 5 TIME(PS) = 4.005 TEMP(K) = 297.16 PRESS = 0.0 ! Etot = -14330.2871 EKtot = 3848.9511 EPtot = -18179.2382 BOND = 99.2020 ANGLE = 283.1707 DIHED = 319.8389 1-4 NB = 199.5079 1-4 EEL = 3055.3434 VDWAALS = 2095.0057 ! EELEC = -24272.3671 EGB = 0.0000 RESTRAINT = 41.0603 ! EAMBER (non-restraint) = -18220.2985 ------------------------------------------------------------------------------ NSTEP = 6 TIME(PS) = 4.006 TEMP(K) = 297.96 PRESS = 0.0 ! Etot = -14330.5031 EKtot = 3859.3314 EPtot = -18189.8346 BOND = 96.9481 ANGLE = 277.6425 DIHED = 319.8333 1-4 NB = 199.1482 1-4 EEL = 3053.6194 VDWAALS = 2093.6405 ! EELEC = -24271.6192 EGB = 0.0000 RESTRAINT = 40.9526 ! EAMBER (non-restraint) = -18230.7872 ------------------------------------------------------------------------------ NSTEP = 7 TIME(PS) = 4.007 TEMP(K) = 298.95 PRESS = 0.0 ! Etot = -14330.6588 EKtot = 3872.1405 EPtot = -18202.7993 BOND = 93.6798 ANGLE = 271.4535 DIHED = 319.3672 1-4 NB = 198.7150 1-4 EEL = 3051.6675 VDWAALS = 2092.0982 ! EELEC = -24270.6614 EGB = 0.0000 RESTRAINT = 40.8808 ! EAMBER (non-restraint) = -18243.6801 ------------------------------------------------------------------------------ NSTEP = 8 TIME(PS) = 4.008 TEMP(K) = 299.90 PRESS = 0.0 ! Etot = -14330.6005 EKtot = 3884.4149 EPtot = -18215.0154 BOND = 90.4635 ANGLE = 266.0539 DIHED = 318.4966 1-4 NB = 198.2636 1-4 EEL = 3049.5370 VDWAALS = 2090.4347 ! EELEC = -24269.1041 EGB = 0.0000 RESTRAINT = 40.8396 ! EAMBER (non-restraint) = -18255.8550 ------------------------------------------------------------------------------ NSTEP = 9 TIME(PS) = 4.009 TEMP(K) = 300.62 PRESS = 0.0 ! Etot = -14330.5209 EKtot = 3893.7656 EPtot = -18224.2865 BOND = 88.2150 ANGLE = 262.5344 DIHED = 317.3261 1-4 NB = 197.8414 1-4 EEL = 3047.2809 VDWAALS = 2088.7038 ! EELEC = -24267.0114 EGB = 0.0000 RESTRAINT = 40.8233 ! EAMBER (non-restraint) = -18265.1098 ------------------------------------------------------------------------------ NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 301.01 PRESS = 0.0 ! Etot = -14330.2612 EKtot = 3898.7752 EPtot = -18229.0364 BOND = 87.4510 ANGLE = 261.3871 DIHED = 315.9945 1-4 NB = 197.4781 1-4 EEL = 3044.9515 VDWAALS = 2086.9480 ! EELEC = -24264.0719 EGB = 0.0000 RESTRAINT = 40.8253 ! EAMBER (non-restraint) = -18269.8617 ------------------------------------------------------------------------------ *************** *** 200,209 **** NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 298.58 PRESS = 0.0 ! Etot = -14371.3416 EKtot = 3867.3184 EPtot = -18238.6599 BOND = 93.5081 ANGLE = 275.6962 DIHED = 318.2117 1-4 NB = 198.9690 1-4 EEL = 3053.5382 VDWAALS = 2093.6022 ! EELEC = -24272.1854 EGB = 0.0000 RESTRAINT = 0.0000 ------------------------------------------------------------------------------ --- 210,220 ---- NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 298.58 PRESS = 0.0 ! Etot = -14330.1889 EKtot = 3867.3184 EPtot = -18197.5073 BOND = 93.5081 ANGLE = 275.6962 DIHED = 318.2117 1-4 NB = 198.9690 1-4 EEL = 3053.5382 VDWAALS = 2093.6022 ! EELEC = -24272.1854 EGB = 0.0000 RESTRAINT = 41.1527 ! EAMBER (non-restraint) = -18238.6599 ------------------------------------------------------------------------------ *************** *** 211,221 **** NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 1.46 PRESS = 0.0 ! Etot = 0.1555 EKtot = 18.9232 EPtot = 18.9344 BOND = 4.4556 ANGLE = 9.2688 DIHED = 1.3951 1-4 NB = 0.8059 1-4 EEL = 4.7762 VDWAALS = 3.7325 ! EELEC = 4.7577 EGB = 0.0000 RESTRAINT = 0.0000 ! |E(PBS) = 0.4198 ------------------------------------------------------------------------------ --- 222,233 ---- NSTEP = 10 TIME(PS) = 4.010 TEMP(K) = 1.46 PRESS = 0.0 ! Etot = 0.3805 EKtot = 18.9232 EPtot = 19.1072 BOND = 4.4556 ANGLE = 9.2688 DIHED = 1.3951 1-4 NB = 0.8059 1-4 EEL = 4.7762 VDWAALS = 3.7325 ! EELEC = 4.7577 EGB = 0.0000 RESTRAINT = 0.3586 ! EAMBER (non-restraint) = 18.7485 ! |E(PBS) = 0.2316 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 46: Author: Bob Duke (bug reported and analyzed by Petr Kulhanek) Date: 07/8/2005 Programs: pmemd Description: The pmemd indexing algorithm assumes that fractional coordinates are in the range 0 <= f < 1.0. But it is possible to obtain a fractional coordinate that is exactly 1.0, which can lead to erroneous indexing. This should be a very rare error. Fix: Apply the following patches in $AMBERHOME/src/pmemd/src to ew_recip_cit.f90, ew_pairlist.f90 and ew_direct_cit.f90 ------------------------------------------------------------------------------ *** src/pmemd/src/ew_recip_cit.f90 Mon Feb 16 17:31:07 2004 --- src/pmemd/src/ew_recip_cit.f90 Fri Jul 8 15:52:15 2005 *************** *** 1488,1493 **** --- 1488,1499 ---- z_bkt_lo = int(z_lo * dble(cit_tbl_z_dim) / z_box) z_bkt_hi = int(z_hi * dble(cit_tbl_z_dim) / z_box) + ! An extra check to insure that rounding error above does not cause us to + ! index off one end or the other of the cit table + + if (z_bkt_lo .lt. 0) z_bkt_lo = 0 + if (z_bkt_hi .ge. cit_tbl_z_dim) z_bkt_hi = cit_tbl_z_dim - 1 + if (z_bkt_lo .eq. z_bkt_hi) z_wraps = .false. if (z_wraps) then *************** *** 1760,1765 **** --- 1766,1777 ---- z_bkt_lo = int(z_lo * dble(cit_tbl_z_dim)) z_bkt_hi = int(z_hi * dble(cit_tbl_z_dim)) + ! An extra check to insure that rounding error above does not cause us to + ! index off one end or the other of the cit table + + if (z_bkt_lo .lt. 0) z_bkt_lo = 0 + if (z_bkt_hi .ge. cit_tbl_z_dim) z_bkt_hi = cit_tbl_z_dim - 1 + if (z_bkt_lo .eq. z_bkt_hi) z_wraps = .false. if (z_wraps) then *** src/pmemd/src/ew_pairlist.f90 Mon Feb 16 17:31:07 2004 --- src/pmemd/src/ew_pairlist.f90 Fri Jul 8 15:52:13 2005 *************** *** 30,40 **** excl_img_map, img_maskdata, img_mask, tranvec, & atm_maskdata, atm_mask, atm_img_map, & dont_skip_belly_pairs, & - #ifdef MPI fraction, ifail) - #else - ifail) - #endif #include "use_ew_dat.h" #include "use_ew_direct_cit_dat.h" --- 30,36 ---- *************** *** 65,73 **** integer :: atm_mask(*) integer :: atm_img_map(atm_cnt) logical :: dont_skip_belly_pairs - #ifdef MPI double precision :: fraction(3, atm_cnt) - #endif integer :: ifail ! Local record types: --- 61,67 ---- *************** *** 82,90 **** ! Local variables: ! double precision :: cutlist_stk, cutlist_sq double precision :: x_box, y_box, z_box ! double precision :: x_scale, y_scale, z_scale double precision :: x_i, y_i, z_i double precision :: x_j, y_j, z_j double precision :: dx, dy, dz --- 76,85 ---- ! Local variables: ! double precision :: cutlist_sq double precision :: x_box, y_box, z_box ! double precision :: scale_fac_x, scale_fac_y, scale_fac_z ! double precision :: cut_x_frac, cut_y_frac, cut_z_frac double precision :: x_i, y_i, z_i double precision :: x_j, y_j, z_j double precision :: dx, dy, dz *************** *** 94,99 **** --- 89,95 ---- integer :: atm_mask_idx integer :: nxt_img_maskptr, nummask integer :: num_packed + integer :: x_i_idx, y_i_idx, z_i_idx integer :: x_bkts_lo, x_bkts_hi integer :: y_bkts_lo, y_bkts_hi integer :: z_bkts_lo, z_bkts_hi *************** *** 125,141 **** ntypes_stk = ntypes #endif x_box = box(1) y_box = box(2) z_box = box(3) ! x_scale = dble(cit_tbl_x_dim) / x_box ! y_scale = dble(cit_tbl_y_dim) / y_box ! z_scale = dble(cit_tbl_z_dim) / z_box ! ! cutlist_stk = cutlist ! ! cutlist_sq = cutlist_stk * cutlist_stk ! Set up the bucket and translation index mapping arrays. We really only need ! to do this each time if the cit table dimensions are changing, but there --- 121,139 ---- ntypes_stk = ntypes #endif + cutlist_sq = cutlist * cutlist + x_box = box(1) y_box = box(2) z_box = box(3) ! scale_fac_x = dble(cit_tbl_x_dim) ! scale_fac_y = dble(cit_tbl_y_dim) ! scale_fac_z = dble(cit_tbl_z_dim) ! ! cut_x_frac = cutlist / x_box + 0.0001d0 ! fudge to thwart rounding errs ! cut_y_frac = cutlist / y_box + 0.0001d0 ! fudge to thwart rounding errs ! cut_z_frac = cutlist / z_box + 0.0001d0 ! fudge to thwart rounding errs ! Set up the bucket and translation index mapping arrays. We really only need ! to do this each time if the cit table dimensions are changing, but there *************** *** 179,192 **** iaci = ntypes_stk * (img(img_i)%iac - 1) #endif ! ! Determine the bucket ranges that need to be searched: x_i = img(img_i)%imgcrd(1) y_i = img(img_i)%imgcrd(2) z_i = img(img_i)%imgcrd(3) - atm_i = img_atm_map(img_i) - do i = 0, 17 i_tranvec(1, i) = tranvec(1, i) - x_i i_tranvec(2, i) = tranvec(2, i) - y_i --- 177,190 ---- iaci = ntypes_stk * (img(img_i)%iac - 1) #endif ! atm_i = img_atm_map(img_i) ! ! ! These are imaged coordinates: x_i = img(img_i)%imgcrd(1) y_i = img(img_i)%imgcrd(2) z_i = img(img_i)%imgcrd(3) do i = 0, 17 i_tranvec(1, i) = tranvec(1, i) - x_i i_tranvec(2, i) = tranvec(2, i) - y_i *************** *** 209,227 **** excl_img_map(img_j) = 1 ! .ne. 0 = excluded end do ! x_bkts_lo = int((x_i - cutlist_stk + x_box) * x_scale) ! x_bkts_hi = int((x_i + cutlist_stk + x_box) * x_scale) ! y_bkts_lo = int((y_i - cutlist_stk + y_box) * y_scale) ! y_bkts_hi = int((y_i + cutlist_stk + y_box) * y_scale) ! z_bkts_lo = int((z_i - cutlist + z_box) * z_scale) ! z_bkts_hi = int((z_i + z_box) * z_scale) - i_bkt = x_bkts(int((x_i + x_box) * x_scale)) + & - y_bkts(int((y_i + y_box) * y_scale)) + & - z_bkts(z_bkts_hi) - saved_i_bkt_img_j_hi = flat_cit(i_bkt)%img_hi flat_cit(i_bkt)%img_hi = img_i - 1 --- 207,231 ---- excl_img_map(img_j) = 1 ! .ne. 0 = excluded end do ! ! These are indexes into the 3D cit: ! x_i_idx = int(fraction(1, atm_i) * scale_fac_x) ! y_i_idx = int(fraction(2, atm_i) * scale_fac_y) ! z_i_idx = int(fraction(3, atm_i) * scale_fac_z) ! ! This is the flat cit bucket index: ! ! i_bkt = x_i_idx + cit_tbl_x_dim * (y_i_idx + z_i_idx * cit_tbl_y_dim) ! ! ! Determine the bucket ranges that need to be searched: ! ! x_bkts_lo = int((1.d0 + fraction(1, atm_i) - cut_x_frac) * scale_fac_x) ! x_bkts_hi = int((1.d0 + fraction(1, atm_i) + cut_x_frac) * scale_fac_x) ! y_bkts_lo = int((1.d0 + fraction(2, atm_i) - cut_y_frac) * scale_fac_y) ! y_bkts_hi = int((1.d0 + fraction(2, atm_i) + cut_y_frac) * scale_fac_y) ! z_bkts_lo = int((1.d0 + fraction(3, atm_i) - cut_z_frac) * scale_fac_z) ! z_bkts_hi = z_i_idx + cit_tbl_z_dim saved_i_bkt_img_j_hi = flat_cit(i_bkt)%img_hi flat_cit(i_bkt)%img_hi = img_i - 1 *************** *** 436,446 **** ! Local variables: double precision :: cutlist_sq ! double precision :: dble_x_tbl_dim, dble_y_tbl_dim, dble_z_tbl_dim double precision :: x_i, y_i, z_i double precision :: x_j, y_j, z_j double precision :: x_fract_i, y_fract_i, z_fract_i - double precision :: x_fract_cut, y_fract_cut, z_fract_cut double precision :: f1, f2, f3 double precision :: ucell_stk(3, 3) double precision :: dx, dy, dz --- 440,450 ---- ! Local variables: double precision :: cutlist_sq ! double precision :: scale_fac_x, scale_fac_y, scale_fac_z ! double precision :: cut_x_frac, cut_y_frac, cut_z_frac double precision :: x_i, y_i, z_i double precision :: x_j, y_j, z_j double precision :: x_fract_i, y_fract_i, z_fract_i double precision :: f1, f2, f3 double precision :: ucell_stk(3, 3) double precision :: dx, dy, dz *************** *** 451,456 **** --- 455,461 ---- integer :: atm_mask_idx integer :: nxt_img_maskptr, nummask integer :: num_packed + integer :: x_i_idx, y_i_idx, z_i_idx integer :: x_bkts_lo, x_bkts_hi integer :: y_bkts_lo, y_bkts_hi integer :: z_bkts_lo, z_bkts_hi *************** *** 482,498 **** ntypes_stk = ntypes #endif ! dble_x_tbl_dim = dble(cit_tbl_x_dim) ! dble_y_tbl_dim = dble(cit_tbl_y_dim) ! dble_z_tbl_dim = dble(cit_tbl_z_dim) ucell_stk(:,:) = ucell(:,:) ! x_fract_cut = cut_factor(1) * (cutlist / ucell_stk(1,1)) ! y_fract_cut = cut_factor(2) * (cutlist / ucell_stk(2,2)) ! z_fract_cut = cut_factor(3) * (cutlist / ucell_stk(3,3)) ! ! cutlist_sq = cutlist * cutlist ! Set up the bucket and translation index mapping arrays. We really only need ! to do this each time if the cit table dimensions are changing, but there --- 487,505 ---- ntypes_stk = ntypes #endif ! cutlist_sq = cutlist * cutlist ucell_stk(:,:) = ucell(:,:) ! scale_fac_x = dble(cit_tbl_x_dim) ! scale_fac_y = dble(cit_tbl_y_dim) ! scale_fac_z = dble(cit_tbl_z_dim) ! ! ! Here we again fudge cutoff fractions by 0.0001d0 to thwart rounding errs. ! ! cut_x_frac = cut_factor(1) * (cutlist / ucell_stk(1,1)) + 0.0001d0 ! cut_y_frac = cut_factor(2) * (cutlist / ucell_stk(2,2)) + 0.0001d0 ! cut_z_frac = cut_factor(3) * (cutlist / ucell_stk(3,3)) + 0.0001d0 ! Set up the bucket and translation index mapping arrays. We really only need ! to do this each time if the cit table dimensions are changing, but there *************** *** 536,542 **** iaci = ntypes_stk * (img(img_i)%iac - 1) #endif ! ! Determine the bucket ranges that need to be searched: x_i = img(img_i)%imgcrd(1) y_i = img(img_i)%imgcrd(2) --- 543,551 ---- iaci = ntypes_stk * (img(img_i)%iac - 1) #endif ! atm_i = img_atm_map(img_i) ! ! ! These are imaged coordinates: x_i = img(img_i)%imgcrd(1) y_i = img(img_i)%imgcrd(2) *************** *** 548,559 **** i_tranvec(3, i) = tranvec(3, i) - z_i end do - atm_i = img_atm_map(img_i) - - x_fract_i = fraction(1, atm_i) - y_fract_i = fraction(2, atm_i) - z_fract_i = fraction(3, atm_i) - ! Convert the excluded atom mask info into excluded image mask info. At ! this point, the image mask info will include all excluded images. After ! final processing, it will only include those processed by this process --- 557,562 ---- *************** *** 570,588 **** excl_img_map(img_j) = 1 ! .ne. 0 = excluded end do ! x_bkts_lo = int((x_fract_i - x_fract_cut + 1.d0) * dble_x_tbl_dim) ! x_bkts_hi = int((x_fract_i + x_fract_cut + 1.d0) * dble_x_tbl_dim) ! y_bkts_lo = int((y_fract_i - y_fract_cut + 1.d0) * dble_y_tbl_dim) ! y_bkts_hi = int((y_fract_i + y_fract_cut + 1.d0) * dble_y_tbl_dim) ! z_bkts_lo = int((z_fract_i - z_fract_cut + 1.d0) * dble_z_tbl_dim) ! z_bkts_hi = int((z_fract_i + 1.d0) * dble_z_tbl_dim) - i_bkt = x_bkts(int((x_fract_i + 1.d0) * dble_x_tbl_dim)) + & - y_bkts(int((y_fract_i + 1.d0) * dble_y_tbl_dim)) + & - z_bkts(z_bkts_hi) - z_loop: & do z_bkts_idx = z_bkts_lo, z_bkts_hi --- 573,599 ---- excl_img_map(img_j) = 1 ! .ne. 0 = excluded end do ! ! These are indexes into the 3D cit: ! ! x_i_idx = int(fraction(1, atm_i) * scale_fac_x) ! y_i_idx = int(fraction(2, atm_i) * scale_fac_y) ! z_i_idx = int(fraction(3, atm_i) * scale_fac_z) ! ! ! This is the flat cit bucket index: ! ! i_bkt = x_i_idx + cit_tbl_x_dim * (y_i_idx + z_i_idx * cit_tbl_y_dim) ! ! ! Determine the bucket ranges that need to be searched: ! x_bkts_lo = int((1.d0 + fraction(1, atm_i) - cut_x_frac) * scale_fac_x) ! x_bkts_hi = int((1.d0 + fraction(1, atm_i) + cut_x_frac) * scale_fac_x) ! y_bkts_lo = int((1.d0 + fraction(2, atm_i) - cut_y_frac) * scale_fac_y) ! y_bkts_hi = int((1.d0 + fraction(2, atm_i) + cut_y_frac) * scale_fac_y) ! z_bkts_lo = int((1.d0 + fraction(3, atm_i) - cut_z_frac) * scale_fac_z) ! z_bkts_hi = z_i_idx + cit_tbl_z_dim ! ! We have not yet implemented img_hi fiddling per the orthog version... z_loop: & do z_bkts_idx = z_bkts_lo, z_bkts_hi *** src/pmemd/src/ew_direct_cit.f90 Mon Feb 16 17:31:07 2004 --- src/pmemd/src/ew_direct_cit.f90 Fri Jul 8 15:52:12 2005 *************** *** 130,140 **** cit_tranvec, atm_nb_maskdata, atm_nb_mask, & cit_atm_img_map, & dont_skip_belly_pairs, & - #ifdef MPI fraction, ifail) - #else - ifail) - #endif else call get_nb_list_nonorthog(atm_cnt, crd_idx_tbl, cit_img, cit_img_atm_map, & #ifdef DIRFRC_BIGCACHE_OPT --- 130,136 ---- *************** *** 790,795 **** --- 786,806 ---- end if + ! We must have fractional coordinates in the range of 0.0 - 0.999... + ! The algorithm used above will produce fractionals in the range of 0.0 - + ! 1.0, with some possibility of slight underflow (neg value) due to + ! rounding error (confirmed). SO we force fractionals to be nonredundant + ! and within the anticipated range here. + + do i = 1, atm_cnt + if (fraction(1, i) .lt. 0.d0) fraction(1, i) = fraction(1, i) + 1.d0 + if (fraction(1, i) .ge. 1.d0) fraction(1, i) = fraction(1, i) - 1.d0 + if (fraction(2, i) .lt. 0.d0) fraction(2, i) = fraction(2, i) + 1.d0 + if (fraction(2, i) .ge. 1.d0) fraction(2, i) = fraction(2, i) - 1.d0 + if (fraction(3, i) .lt. 0.d0) fraction(3, i) = fraction(3, i) + 1.d0 + if (fraction(3, i) .ge. 1.d0) fraction(3, i) = fraction(3, i) - 1.d0 + end do + return end subroutine get_fract_crds ------------------------------------------------------------------------------ Temporary workarounds: none
********>Bugfix noBTREE:
Author: Roberto Gomperts
Date: 07/29/2005

Programs: sander

Description: Fixed incorrect calls to MPI routines in the noBTREE section
             As expected the noBTREE has a much poorer accumulation of forces 
             and distribution of coordinates than the BTREE alternative. This is
             most evident in certain ewald calculations.
             To aleviate these slowdowns a "ring" algorithm has been included.
             It makes use of SHMEM_PTR and requires substituting -lmpi by -lsma 
             in LOADLIB in config.h. This code is triggered by the inclusion of
             -DSGI_SMA in FPPFLAGS in config.h.
             Note 1: The -DnoBTREE implementation assumes that MPI_IN_PLACE is 
                     working properly
             Note 2: -DnoBTREE can be used alone for any machine but -DSGI_SMA
                     should be used together with -DnoBTREE

Fix:  apply the following patch to amber8/src/sander/parallel.f
      apply the following patch to amber8/src/sander/sander.f

------------------------------------------------------------------------------

*** src/sander/parallel.f	2004-09-14 13:51:22.000000000 -0500
--- src/sander/parallel.f	2005-07-29 04:21:40.000000000 -0500
***************
*** 377,382 ****
--- 377,389 ----
  #  define MPI_DOUBLE_PRECISION MPI_REAL8
  #endif
     
+ #ifdef SGI_SMA
+ INCLUDE "mpp/shmem.fh"
+   _REAL_ fr(*)
+   pointer (fr_p,fr)
+   integer other, k, ibeg, iend
+ #endif
+ 
  #ifndef noBTREE
     integer other,ncyclesm1,k,bit,cs,cr,ns,nr
     integer ist(mpi_status_size)
***************
*** 384,391 ****
     
     call trace_enter( 'fsum' )
     
- #ifndef noBTREE
     if (numtasks <= 1) return
     ncyclesm1 = logtwo(numtasks) - 1
     bit=numtasks/2
     
--- 391,399 ----
     
     call trace_enter( 'fsum' )
     
     if (numtasks <= 1) return
+ 
+ #ifndef noBTREE
     ncyclesm1 = logtwo(numtasks) - 1
     bit=numtasks/2
     
***************
*** 418,432 ****
        
     end do  !  k = 0,ncyclesm1
  #else
     
     call trace_mpi('mpi_reduce_scatter', &
!          rcvcnt3,'MPI_DOUBLE_PRECISION', mpi_sum)
!    call mpi_reduce_scatter(f, tmp(iparpt3(mytaskid)+1), &
           rcvcnt3, MPI_DOUBLE_PRECISION, mpi_sum, &
           commsander, ierr)
!    do i=1, 3*natom
!       f(i) = tmp(i)
!    end do
  #endif
     call trace_exit( 'fsum' )
     return
--- 426,454 ----
        
     end do  !  k = 0,ncyclesm1
  #else
+ #ifdef SGI_SMA
+    !   Implement a "simple" ring algoritm: 0->1, 0->2, 0->3.. 0->n
+    !                                       1->2, 1->3, 1->4.. 1->0
+    !   Need only a barrier at the beginning
+    call mpi_barrier(commsander,ierr)
+    do k=1,numtasks-1
+      other = mod(mytaskid+k,numtasks)
+      fr_p = SHMEM_PTR(f(1),other)
+      ibeg = iparpt3(mytaskid)
+      iend = ibeg + rcvcnt3(mytaskid)
+      ibeg = ibeg + 1
+      f(ibeg:iend) = f(ibeg:iend) + fr(ibeg:iend)
+    enddo
+ #else   
+    !       --- Assume an "in-place" allgatherv works: this seems(?) to
+    !           be true everywhere....
     
     call trace_mpi('mpi_reduce_scatter', &
!          rcvcnt3(mytaskid),'MPI_DOUBLE_PRECISION', mpi_sum)
!    call mpi_reduce_scatter(f, f(iparpt3(mytaskid)+1), &
           rcvcnt3, MPI_DOUBLE_PRECISION, mpi_sum, &
           commsander, ierr)
! #endif
  #endif
     call trace_exit( 'fsum' )
     return
***************
*** 450,455 ****
--- 472,483 ----
  #      define MPI_DOUBLE_PRECISION MPI_REAL8
  #    endif
     
+ #ifdef SGI_SMA
+ INCLUDE "mpp/shmem.fh"
+   _REAL_ xr(*)
+   pointer (xr_p,xr)
+   integer other, k, ibeg, iend
+ #endif
  #  ifndef noBTREE
     integer other,ncyclesm1,k,bit,cs,cr,ns,nr
     integer ist(mpi_status_size),ireq
***************
*** 457,465 ****
  #endif
     
     call trace_enter( 'xdist' )
  #  ifndef noBTREE
     
-    if (numtasks <= 1) return
     ncyclesm1 = logtwo(numtasks) - 1
     bit=1
     do k = 0,ncyclesm1
--- 485,493 ----
  #endif
     
     call trace_enter( 'xdist' )
+    if (numtasks <= 1) return
  #  ifndef noBTREE
     
     ncyclesm1 = logtwo(numtasks) - 1
     bit=1
     do k = 0,ncyclesm1
***************
*** 495,511 ****
        bit = ishft(bit,1)
     end do
  #  else
!    
     !       --- Assume an "in-place" allgatherv works: this seems(?) to
     !           be true everywhere....
     
     call trace_mpi('mpi_allgatherv', &
!          rcvcnt3(mytaskid)+rcvcnt3,'MPI_DOUBLE_PRECISION', iparpt3)
     call mpi_allgatherv( &
!          x(iparpt3(mytaskid)+1),rcvcnt3(mytaskid), &
           MPI_DOUBLE_PRECISION,x,rcvcnt3,iparpt3, &
           MPI_DOUBLE_PRECISION,commsander, ierr)
  #  endif
     call trace_exit( 'xdist' )
     return
  end subroutine xdist 
--- 523,553 ----
        bit = ishft(bit,1)
     end do
  #  else
! #ifdef SGI_SMA
!    !   Implement a "simple" ring algoritm: 0->1, 0->2, 0->3.. 0->n
!    !                                       1->2, 1->3, 1->4.. 1->0
!    !   Need only a barrier at the end
!    do k=1,numtasks-1
!      other = mod(mytaskid+k,numtasks)
!      xr_p = SHMEM_PTR(x(1),other)
!      ibeg = iparpt3(mytaskid)
!      iend = ibeg + rcvcnt3(mytaskid)
!      ibeg = ibeg + 1
!      xr(ibeg:iend) = x(ibeg:iend)
!    enddo
!    call mpi_barrier(commsander,ierr)
! #else   
     !       --- Assume an "in-place" allgatherv works: this seems(?) to
     !           be true everywhere....
     
     call trace_mpi('mpi_allgatherv', &
!          rcvcnt3(mytaskid),'MPI_DOUBLE_PRECISION', iparpt3(mytaskid))
     call mpi_allgatherv( &
!          MPI_IN_PLACE,rcvcnt3(mytaskid), &
           MPI_DOUBLE_PRECISION,x,rcvcnt3,iparpt3, &
           MPI_DOUBLE_PRECISION,commsander, ierr)
  #  endif
+ #  endif
     call trace_exit( 'xdist' )
     return
  end subroutine xdist 

------------------------------------------------------------------------------

*** src/sander/sander.f	2004-09-14 13:51:23.000000000 -0500
--- src/sander/sander.f	2005-07-28 13:41:14.000000000 -0500
***************
*** 588,594 ****
--- 588,600 ----
     _REAL_  dummy
  #endif
  
+ #ifndef SGI_SMA
     _REAL_,  dimension(:), allocatable :: x, r_stack
+ #else
+    _REAL_,  dimension(:), allocatable :: r_stack
+    _REAL_  x(*)
+    pointer (x_p,x)
+ #endif
     integer, dimension(:), allocatable :: ix, ipairs, i_stack
     character(len=4), dimension(:), allocatable :: ih
     
***************
*** 680,688 ****
--- 686,717 ----
  
        !     --- dynamic memory allocation:
  
+ #ifdef SGI_SMA
+       !  if we are using symmetric heap allocation:
+       !    - end the master code
+       !    - broadcast the sizes (just send all)
+       !    - do a barrier
+       !    - shpalloc x (for all)
+       !    - resume master code
+ 
+       allocate( ix(lasti), ipairs(lastpr), ih(lasth), stat = ier )
+       REQUIRE( ier == 0 )
+ 
+       endif ! master
+ 
+    call mpi_bcast(natom,BC_MEMORY,mpi_integer,0,commsander,ierr)
+    call mpi_barrier(commsander,ierr)
+ 
+       CALL SHPALLOC(x_p, lastr*2, ier, 1 )
+       REQUIRE( ier == 0 )
+ 
+    if (master) then
+ #else
        allocate( x(lastr), ix(lasti), ipairs(lastpr), ih(lasth), stat = ier )
        REQUIRE( ier == 0 )
  
+ #endif
+ 
        if( igb == 0 ) then
  #ifndef PSANDER
           lastrst = sizffwrk + siz_q + natom*(4 + 6*order)
***************
*** 1117,1125 ****
     !     ---allocate memory on the non-master nodes:
  
     if( .not.master ) then
        allocate( x(1:lastr), stat = ier )
        REQUIRE( ier == 0 )
! 
        allocate( ix(1:lasti), stat = ier )
        REQUIRE( ier == 0 )
  
--- 1146,1155 ----
     !     ---allocate memory on the non-master nodes:
  
     if( .not.master ) then
+ #ifndef SGI_SMA
        allocate( x(1:lastr), stat = ier )
        REQUIRE( ier == 0 )
! #endif
        allocate( ix(1:lasti), stat = ier )
        REQUIRE( ier == 0 )
  
***************
*** 1387,1394 ****
--- 1417,1429 ----
     REQUIRE( ier == 0 )
     deallocate( ix, stat = ier )
     REQUIRE( ier == 0 )
+ #ifndef SGI_SMA
     deallocate( x, stat = ier )
     REQUIRE( ier == 0 )
+ #else
+    CALL SHPDEALLC(x_p, ier, 1 )
+    REQUIRE( ier == 0 )
+ #endif
  
     return
  
*******>Bugfix 48:
Author: Ross Walker and Mike Crowley
Date: 08/19/2005
 
Programs: sander
 
Description: A parameter in the nmrred.f file was incorrectly defined as
             an integer instead of a _REAL_. This can lead to some machines
             giving incorrect (negative) temperatures for TEMP0 and or other
             problems related to nmr weight restraints when either value1 or
             value2 was set to exactly 0.0.
 
Fix:  Apply the following patch to 
         $AMBERHOME/src/sander/nmrred.f
 
------------------------------------------------------------------------------
--- src/sander/nmrred.f	2005-08-19 16:17:07.000000000 -0700
+++ src/sander/nmrred.f	2005-08-19 16:17:15.000000000 -0700
@@ -215,7 +215,7 @@
    parameter (iflag = 28)
 #endif
    ! ... ZERNER is a value near zero used for weights set to 0.
-   integer zerner
+   _REAL_ zerner
    parameter (zerner = 1.0d-7)
    character(len=8) type,flag(iflag)
    character(len=10) redirc(8)
------------------------------------------------------------------------------
 
Temporary workarounds: Do not use values of exactly zero for nmr weight changes.

********>Bugfix 49:
Author: Ray Luo
Date: 08/17/2005

Programs: pbsa

Description: The program outputs highly fluctuating reaction field energies
             when the net charges of "neutral" systems are close to
             but not equal to zero. This is due to the failure in scaling
             solvent-induced surface charges in such situations.

Fix: Apply the following patch to amber8/src/pbsa/pb_force.f

------------------------------------------------------------------------------
*** src/pbsa/pb_force.f  2004-03-13 22:21:24.000000000 -0800
--- src/pbsa/pb_force.f  2005-08-25 11:28:09.646492724 -0700
***************
*** 459,465 ****
     !_PBREAL_ gci, gcj1, gcj2, gcj3, gcj4, gcj5, gcj6, gcj7, gcj8
     !_PBREAL_ gcij(27)

!    _PBREAL_, parameter :: smallcrg = 0.0001d0
      
     ! initialization
      
--- 459,465 ----
     !_PBREAL_ gci, gcj1, gcj2, gcj3, gcj4, gcj5, gcj6, gcj7, gcj8
     !_PBREAL_ gcij(27)

!    _PBREAL_, parameter :: smallcrg = 0.5d0
      
     ! initialization
      
------------------------------------------------------------------------------

Temporary workaround: You can avoid this bug by forcing the net charges of 
neutral systems zero within rounding error.

********>Bugfix 50:
Author: Ross Walker and Mike Crowley
Date: 08/25/2005
                                                                                                                                                             
Programs: Sander
                                                                                                                                                             
Description: When doing non periodic simulations with extended systems sander
             could erroneously produce an error about FFT dimensions. This
             was due to memory being allocated for periodic FFT's even when
             running in gas phase.
                                                                                                                                                             
Fix: Apply the following patch to amber8/src/sander/ew_setup.f

------------------------------------------------------------------------------
--- src/sander/ew_setup.f	2005-08-25 15:05:07.000000000 -0700
+++ src/sander/ew_setup.f	2005-08-25 15:04:54.000000000 -0700
@@ -792,12 +792,14 @@
 
    call fill_xtran(xtran)
    call fill_tranvec()
-   call get_stack(l_tau,mxeedtab)
-   call fill_eed_table(eedtbdns,mxeedtab, &
-         x(leed_cub),r_stack(l_tau),x(leed_lin),eedmeth,ee_type)
-   call free_stack(l_tau)
+   if (periodic /= 0) then !Do not need this memory for non-periodic sim.
+     call get_stack(l_tau,mxeedtab)
+     call fill_eed_table(eedtbdns,mxeedtab, &
+           x(leed_cub),r_stack(l_tau),x(leed_lin),eedmeth,ee_type)
+     call free_stack(l_tau)
+   end if
    call init_coulomb_switch(cutoffnb,dxdr, &
-         x(leed_cub),x(leed_lin),eedtbdns,eedmeth,ee_type)
+           x(leed_cub),x(leed_lin),eedtbdns,eedmeth,ee_type)
    call vdw_correct_setup(numatoms,ix(i04),ntypes,ix(invdwcls))
    if( icfe /= 0 ) &
          call vdw_correct_setup(numatoms,ix(i84),ntypes,ix(invdwcls2))
@@ -810,9 +812,11 @@
       call mpi_comm_size(recip_comm,numtasks,ierr)
       call mpi_comm_rank(recip_comm,mytaskid,ierr)
 #endif
-      call pmesh_kspace_setup( &
-            x(lprefac1),x(lprefac2),x(lprefac3),x(lfftable), &
-            nfft1,nfft2,nfft3,order,sizfftab,sizffwrk,opt_infl,ew_type)
+      if (periodic /= 0) then !do not need to do this for non-periodi
+        call pmesh_kspace_setup( &
+              x(lprefac1),x(lprefac2),x(lprefac3),x(lfftable), &
+              nfft1,nfft2,nfft3,order,sizfftab,sizffwrk,opt_infl,ew_type)
+      end if
 #ifdef MPI
       call mpi_comm_size(world_comm,numtasks,ierr)
       call mpi_comm_rank(world_comm,mytaskid,ierr)
-------------------------------------------------------------------------------
Temporary workaround: None

********>Bugfix 51:
Author: Ross Walker and Wei Zhang
Date: 09/12/2005
                                                                                                                                                             
Programs: XLeap and tleap
                                                                                                                                                             
Description: TIP3PBOX and SPCBOX had their angles specified in degrees in the
             solvents.lib file but leap expects this value to be in radians.
             This does not cause a problem if one uses the solvatebox command
             but if one were to save the TIP3PBOX unit or SPCBOX unit directly
             as a prmtop and inpcrd file then the box angles will be wrong.

Fix: Apply the following patch to amber8/dat/leap/lib/solvents.lib

------------------------------------------------------------------------------
--- dat/leap/lib/solvents.lib   2005-09-12 11:33:30.000000000 -0700
+++ dat/leap/lib/solvents.lib   2005-09-12 11:34:31.000000000 -0700
@@ -65959,7 +65959,7 @@
  "H2" "HW" 0 -1 0.0
 !entry.SPCBOX.unit.boundbox array dbl
  1.000000
- 90.000000
+ 1.570796
  18.774349
  18.774349
  18.774349
@@ -70795,7 +70795,7 @@
  "H2" "HW" 0 -1 0.0
 !entry.TIP3PBOX.unit.boundbox array dbl
  1.000000
- 90.000000
+ 1.570796
  18.774349
  18.774349
  18.774349
-------------------------------------------------------------------------------
Temporary workaround: Do not use the TIP3PBOX and SPCBOX units directly - only
use them with the solvatebox or solvateoct commands.

********>Bugfix 52:
Author: Bob Duke
Date: 10/12/2005

Programs: sander

Description: For regular ewald calculations, the user needs to be able to set
             the lastrst value, but this was overwritten in the original code.

Fix: Apply the following patch to amber8/src/sander/sander.f

------------------------------------------------------------------------------
*** src/sander/sander.f	2005/08/24 19:24:40	7.208
--- src/sander/sander.f	2005/10/12 17:36:01
***************
*** 712,718 ****
  
  #endif
  
!       if( igb == 0 ) then
  #ifndef PSANDER
           lastrst = sizffwrk + siz_q + natom*(4 + 6*order)
           if( mpoltype == 1 ) lastrst = lastrst + 3*order*natom
--- 712,720 ----
  
  #endif
  
!       if( igb == 0 .and. ew_type == 1 ) then
!         ! For regular ewald, user must set a value in mdin ctrl
!       else if( igb == 0 ) then
  #ifndef PSANDER
           lastrst = sizffwrk + siz_q + natom*(4 + 6*order)
           if( mpoltype == 1 ) lastrst = lastrst + 3*order*natom

-------------------------------------------------------------------------------
Temporary workaround: None.

********>Bugfix 53:
Author: Ross Walker and Wei Zhang
Date: 10/14/2005

Programs: tLeap and XLeap

Description: When reading in an frcmod file containing adjusted 
             improper torsion parameters Leap may not overide the
             parameters that were read in from the main parmxx.dat file.

Fix: Apply the following patch to amber8/src/leap/src/parmSet.c

------------------------------------------------------------------------------
*** src/leap/src/leap/parmSet.c	2005-10-14 09:09:13.000000000 -0700
--- src/leap/src/leap/parmSet.c	2005-10-14 09:09:41.000000000 -0700
***************
*** 514,524 ****
  
  		    int	iNew, iOld;
  
! 	            iNew = iParmSetTorsionGenerality( tmPCur->tpTorsion.sType1,
  	    					 tmPCur->tpTorsion.sType2,
  						 tmPCur->tpTorsion.sType3,
  						 tmPCur->tpTorsion.sType4 );
! 	            iOld = iParmSetTorsionGenerality( tpPTorsion->sType1,
  	    					 tpPTorsion->sType2,
  						 tpPTorsion->sType3,
  						 tpPTorsion->sType4 );
--- 514,524 ----
  
  		    int	iNew, iOld;
  
! 	            iOld = iParmSetTorsionGenerality( tmPCur->tpTorsion.sType1,
  	    					 tmPCur->tpTorsion.sType2,
  						 tmPCur->tpTorsion.sType3,
  						 tmPCur->tpTorsion.sType4 );
! 	            iNew = iParmSetTorsionGenerality( tpPTorsion->sType1,
  	    					 tpPTorsion->sType2,
  						 tpPTorsion->sType3,
  						 tpPTorsion->sType4 );
-------------------------------------------------------------------------------
Temporary workaround: Edit the main parm file with your improper dihedral
                      changes instead of using a frcmod file.

********>Bugfix 54:
Author: John Chodera
Date: 11/02/2005

Programs: sander

Description: When ntt=2 is set, the velocities are not randomly chosen from
             a Maxwell-Boltzmann distribution at a time consistent with the
             postions, but rather at a time a half-step off.  This generally
             (always?) leads to a temperature that is higher than the one 
             desired.   This patch makes the algorithm more consistent with 
             what is intended for velocity resetting.

Fix: Apply the following patch to amber8/src/sander/runmd.f

------------------------------------------------------------------------------
*** src/sander/runmd.f	2005/02/10 22:07:42	7.260
--- src/sander/runmd.f	2005/11/02 17:47:28
***************
*** 964,969 ****
--- 964,988 ----
  #endif
           if (ibelly > 0) call bellyf(nr,ix(ibellygp),v)
        end if
+ 
+       ! At this point in the code, the velocities lag the positions
+       ! by half a timestep.  If we intend for the velocities to be drawn 
+       ! from a Maxwell distribution at the timepoint where the positions and 
+       ! velocities are synchronized, we have to correct these newly 
+       ! redrawn velocities by backing them up half a step using the 
+       ! current force.
+       ! Note that this fix only works for Newtonian dynamics.
+       if( gammai == 0.d0 ) then                         
+          i3 = 3*(istart-1)
+          do j=istart,iend
+             wfac = winv(j) * dt5
+             v(i3+1) = v(i3+1) - f(i3+1)*wfac
+             v(i3+2) = v(i3+2) - f(i3+2)*wfac
+             v(i3+3) = v(i3+3) - f(i3+3)*wfac
+             i3 = i3+3
+          end do
+       end if
+ 
  # ifdef MPI
        call trace_mpi('mpi_bcast',3*natom,'MPI_DOUBLE_PRECISION',0)
        call mpi_bcast(v, 3*natom, MPI_DOUBLE_PRECISION, &
-------------------------------------------------------------------------------
Temporary workarounds: none

********>Bugfix 55:
Author: Bob Duke
Date: 11/17/2005

Programs: pmemd

Description: With new-style prmtop files, the title echoed to the output
             and restrt files is not correct.

Fix: Apply the following patch to amber8/src/pmemd/src/prmtop_dat.f90

------------------------------------------------------------------------------
*** src/pmemd/src/prmtop_dat.f90	2004/02/16 21:32:57	1.3
--- src/pmemd/src/prmtop_dat.f90	2005/11/17 19:13:39
***************
*** 182,188 ****
    type = 'TITLE'
    call nxtsec(8, 6, 0, fmtin, type, fmt, errcode)
  
!   read(8, fmt) prmtop_ititl
  
    fmtin = ifmt
    type = 'POINTERS'
--- 182,192 ----
    type = 'TITLE'
    call nxtsec(8, 6, 0, fmtin, type, fmt, errcode)
  
!   ! NOTE the hack below (copied from sander) that prevents the hollerith format
!   ! returned from the prmtop from screwing things up (the read format is
!   ! fmtin, not the returned fmt).
! 
!   read(8, fmtin) prmtop_ititl
  
    fmtin = ifmt
    type = 'POINTERS'
-------------------------------------------------------------------------------
Temporary workarounds: none

********>Bugfix 56:
Author: Dave Case (bug reported by Bob Duke)
Date: 12/7/2005

Programs: sander

Description: The bugfix.54 patch, which changed the way in which the ntt=2
             option applied its randomized velocities, is not correct for
             parallel runs.  Basically, the new update was placed before
             a broadcast of velocities, instead of after it.

Fix: Apply the following patch to amber8/src/sander/runmd.f

------------------------------------------------------------------------------
*** src/sander/runmd.f.old	2005-12-07 16:59:29.645022320 -0800
--- src/sander/runmd.f	2005-12-07 17:09:14.562101408 -0800
***************
*** 940,969 ****
        if (master) then
           write (6,'(a,i8)') 'Setting new random velocities at step ', &
                 nstep + 1
- #ifdef PSANDER
-       endif
-       call setvel(nr,v,winv,temp0*factt,init,iscale,scalm)
-       if (ibelly > 0) call bellyf(nr,ix(ibellygp),v)
- #else
           call setvel(nr,v,winv,temp0*factt,init,iscale,scalm)
  #ifdef LES
       
!       ! newvel call is fixed for the dual target temperatures
  
!       if (temp0les >= 0.d0.and.temp0 /= temp0les) then
!          vscalt = sqrt (temp0les/temp0) 
!          do j=istart,iend
!            if(cnum(j) > 0) then
!              i3 = 3*(j-1)
!              v(i3+1) = v(i3+1) * vscalt
!              v(i3+2) = v(i3+2) * vscalt
!              v(i3+3) = v(i3+3) * vscalt
!            endif
!          end do
!       end if
  #endif
           if (ibelly > 0) call bellyf(nr,ix(ibellygp),v)
        end if
  
        ! At this point in the code, the velocities lag the positions
        ! by half a timestep.  If we intend for the velocities to be drawn 
--- 940,968 ----
        if (master) then
           write (6,'(a,i8)') 'Setting new random velocities at step ', &
                 nstep + 1
           call setvel(nr,v,winv,temp0*factt,init,iscale,scalm)
  #ifdef LES
       
!          ! newvel call is fixed for the dual target temperatures
  
!          if (temp0les >= 0.d0.and.temp0 /= temp0les) then
!             vscalt = sqrt (temp0les/temp0) 
!             do j=1,natom
!               if(cnum(j) > 0) then
!                 i3 = 3*(j-1)
!                 v(i3+1) = v(i3+1) * vscalt
!                 v(i3+2) = v(i3+2) * vscalt
!                 v(i3+3) = v(i3+3) * vscalt
!               endif
!             end do
!          end if
  #endif
           if (ibelly > 0) call bellyf(nr,ix(ibellygp),v)
        end if
+ # ifdef MPI
+       call trace_mpi('mpi_bcast',3*natom,'MPI_DOUBLE_PRECISION',0)
+       call mpi_bcast(v, 3*natom, MPI_DOUBLE_PRECISION, 0, commsander, ierr)
+ # endif
  
        ! At this point in the code, the velocities lag the positions
        ! by half a timestep.  If we intend for the velocities to be drawn 
***************
*** 983,995 ****
           end do
        end if
  
- # ifdef MPI
-       call trace_mpi('mpi_bcast',3*natom,'MPI_DOUBLE_PRECISION',0)
-       call mpi_bcast(v, 3*natom, MPI_DOUBLE_PRECISION, &
-             0, commsander, ierr)
- # endif
- #endif
-       
     end if  ! (resetvelo)
     
     call timer_start(TIME_VERLET)
--- 982,987 ----
           end do
        end if
  
     end if  ! (resetvelo)
     
     call timer_start(TIME_VERLET)
-------------------------------------------------------------------------------
Temporary workarounds: none

********>Bugfix 57:
Author: Bob Duke
Date: 12/08/2005

Programs: pmemd

Description: This patch is the equivalent of sander bugfix 11.

Fix: Apply the following patch to amber8/src/pmemd/src/nextprmtop_section.f90

------------------------------------------------------------------------------
*** src/pmemd/src/nextprmtop_section.f90      2005-12-08 13:55:48.000000000 -0500
--- src/pmemd/src/nextprmtop_section.f90    	2005-12-09 17:52:31.000000000 -0500
***************
*** 1,20 ****
! !*******************************************************************************
! !
  ! Module: nextprmtop_section_module
  !
  ! Description: 
! !              
! !*******************************************************************************
! 
  module nextprmtop_section_module
  
! contains
! 
! !*******************************************************************************
! !
  ! Subroutine:  nxtsec (NeXT SECtion)
  !
! ! Description: 
  !
  !   This routine reads data from a new-format PARM file. It
  !   searches for the section with a %FLAG header of FLAG. It returns
--- 1,16 ----
! !*******************************************************************************!
  ! Module: nextprmtop_section_module
  !
  ! Description: 
! !
! !*******************************************************************************                                                                                
  module nextprmtop_section_module
+                                                                                 contains
  
! !*******************************************************************************!
  ! Subroutine:  nxtsec (NeXT SECtion)
  !
! ! Description:
  !
  !   This routine reads data from a new-format PARM file. It
  !   searches for the section with a %FLAG header of FLAG. It returns
***************
*** 56,61 ****
--- 52,60 ----
  !   Author: David Pearlman
  !   Date: 09/00
  !
+ !   Scott Brozell June 2004
+ !   Converted loop control to Fortran 90; these changes are g77 compatible.
+ !
  !   The PARM file has the following format. 
  !
  !   %VERSION  VERSION_STAMP = Vxxxx.yyy  DATE = mm:dd:yy hh:mm:ss 
***************
*** 98,246 ****
  !   %FLAG cards and store the lines they appear on. That way, on
  !   subsequent calls we'll know immediately if we should read further
  !   down the file, rewind, or exit with an error (flag not found).
! !              
  !*******************************************************************************
  
! subroutine nxtsec(IUNIT,IOUT,IONERR,FMTOLD,FLAG,FMT,IOK)
  
!   logical first
!   save nxtlc1,nxtlc2,nxtlc3,first
!   data first/.true./
  
  ! mxnxfl is maximum number of %flag cards that can be specified
  
!       parameter (mxnxfl = 500)
  
!       character(*) fmtold,fmt,flag
  
!       character(80) nxtflg
!       character(8) prdat,prtim
!       character(255) aa
!       common /nxtlc1/inxtfl(2,mxnxfl),iprvrr,numflg,iblock
!       common /nxtlc2/rpver
!       common /nxtlc3/nxtflg(mxnxfl),prdat,prtim
! 
!       if (first) then
! 
!       rewind(iunit)
! 
! ! First, see if this is a new format PARM file. That is, if the %VERSION
! ! line exists. If not, then we assume it's an old format PARM file. In
! ! this case, every call to NXTSEC will simply result in an immediate
! ! return. This means all reads from the calling routine will be done
! ! sequentially from the PARM file. Store the version number as a real
! ! in RPVER. Store the date and time strings as character strings in
! ! PRDAT and PRTIM.
! 
!       do 10 i = 1,9999999
!          read(iunit,11,end=20) aa
!    11    format(a)
!          if (aa(1:8).ne.'%VERSION') go to 10
! 
!          ipt = index(aa,'VERSION_STAMP')
!          if (ipt.le.0) go to 10
! 
!          ipt2 = nnbchr(aa,ipt+13,0,0)
!          if (aa(ipt2:ipt2).ne.'=') go to 9000
! 
!          ipt3 = nnbchr(aa,ipt2+1,0,0)
!          if (aa(ipt3:ipt3).ne.'V') go to 9001
! 
!          ipt4 = nnbchr(aa,ipt3+1,0,1)
!          if (ipt4-1 - (ipt3+1) + 1 .ne.8) go to 9002
!          read(aa(ipt3+1:ipt4-1),'(f8.3)') rpver
! 
!          ipt5 = index(aa,'date')
!          if (ipt5.le.0) then
!            prdat = 'xx/xx/xx'
!            prtim = 'xx:xx:xx'
!            go to 50
!          end if
!          ipt6 = nnbchr(aa,ipt5+4,0,0)
!          if (aa(ipt6:ipt6).ne.'=') go to 9003
!          ipt7 = nnbchr(aa,ipt6+1,0,0)
!          ipt8 = nnbchr(aa,ipt7+1,0,1)
!          if (ipt8-1 - ipt7 + 1 .ne. 8) go to 9004
!          prdat = aa(ipt7:ipt8-1)
! 
!          ipt9 = nnbchr(aa,ipt8+1,0,0)
!          ipt10 = nnbchr(aa,ipt9+1,0,1)
!          if (ipt10-1 - ipt9 + 1 .ne. 8) go to 9005
!          prtim = aa(ipt9:ipt10-1)
!          write(iout,15) rpver,prdat,prtim
!    15    format('| New style PARM file read.',/, &
!                 '| Version = ',f8.3,' Date = ',a,' Time = ',a,/)
!          iprvrr = 0
!          go to 50
!    10 continue
  
  ! Get here if no VERSION flag read. Set IPRVRR = 1 and return.
  ! On subsequent calls, if IPRVRR = 1, we return immediately.
  
!    20 iprvrr = 1
!       iok = -1
!       write(iout,'(a,/)') '| Old style PARM file read.'
!       fmt = fmtold
!       rewind(iunit)
!       first = .false.
!       return
  
  ! %VERSION line successfully read. Now load the flags into NXTFLG(I)
  ! and the line pointer and lengths of the flags into 
  ! INXTFL(1,I) and INXTFL(2,I), respectively. NUMFLG will be the 
  ! total number of flags read.
  
!    50 rewind(iunit)
!       numflg = 0
!       do i = 1,999999
!          read(iunit,11,end=99) aa
!          if (aa(1:5).eq.'%FLAG') then
!            numflg = numflg + 1
!            ipt2 = nnbchr(aa,6,0,0)
!            if (ipt2.eq.-1) go to 9006
!            ipt3 = nnbchr(aa,ipt2,0,1)-1
! 
!            inxtfl(1,numflg) = i
!            inxtfl(2,numflg) = ipt3-ipt2+1
!            nxtflg(numflg) = aa(ipt2:ipt3)
!          end if
!       end do
!    99 rewind(iunit)
!       iblock = 0
!       first = .false.
        end if
  
  ! Start search for passed flag name
! 
  ! If this is an old-style PARM file, we can't do the search. Simply
  ! set IOK = -1, FMT to FMTOLD, and return
  
!       if (iprvrr.eq.1) then
!          iok = -1
!          fmt = fmtold
!          return
        end if
! 
!       lflag = nnbchr(flag,1,0,1)-1
!       if (lflag.eq.-2) lflag = len(flag)
!       do i = 1,numflg
!          if (lflag.eq.inxtfl(2,i)) then
!             if (flag(1:lflag).eq.nxtflg(i)(1:lflag)) then
!                il2us = inxtfl(1,i)
!                go to 120
!             end if
!          end if
!       end do
  
  ! Get here if flag does not correspond to any stored. Either stop
  ! or return depending on IONERR flag.
  
!       if (ionerr.eq.0) then
!          go to 9007
!       else if (ionerr.eq.1) then
!          iok = -2
!          return
!       end if
  
  ! Flag found. Set file pointer to the first line following the appropriate
  ! %FLAG line and then search for %FORMAT field.
--- 97,268 ----
  !   %FLAG cards and store the lines they appear on. That way, on
  !   subsequent calls we'll know immediately if we should read further
  !   down the file, rewind, or exit with an error (flag not found).
! !
  !*******************************************************************************
  
! subroutine nxtsec(iunit, iout, ionerr, fmtold, flag, fmt, iok)
! 
!   implicit none
! 
!   ! Formal arguments:
  
!   integer       :: iunit
!   integer       :: iout
!   integer       :: ionerr
!   character*(*) :: fmtold,fmt,flag
!   integer       :: iok
! 
!   ! Local variables:
  
  ! mxnxfl is maximum number of %flag cards that can be specified
  
!   integer, parameter    :: mxnxfl = 500
  
!   integer               :: i
!   integer               :: ipt, ipt2, ipt3, ipt4, ipt5, ipt6, ipt7, ipt8, &
!                            ipt9, ipt10
!   integer               :: lflag
!   integer               :: il2us
!   integer               :: ifind
!   integer               :: mblock
!   integer               :: ilfo
! 
!   character*255         :: aa
!   character*80, save    :: nxtflg(mxnxfl)
!   character*8, save     :: prdat, prtim
! 
!   integer, save         :: inxtfl(2, mxnxfl), iprvrr, numflg, iblock
!   logical, save         :: first = .true.
!   real, save            :: rpver
! 
!   iok = 0
! 
!   if (first) then
! 
!     rewind(iunit)
! 
!     ! First, see if this is a new format PARM file. That is, if the %VERSION
!     ! line exists. If not, then we assume it's an old format PARM file. In
!     ! this case, every call to NXTSEC will simply result in an immediate
!     ! return. This means all reads from the calling routine will be done
!     ! sequentially from the PARM file. Store the version number as a real
!     ! in RPVER. Store the date and time strings as character strings in
!     ! PRDAT and PRTIM.
! 
!     do
! 
!       read(iunit,11,end=20) aa
! 11    format(a)
!       if (aa(1:8).ne.'%VERSION') cycle
! 
!       ipt = index(aa,'VERSION_STAMP')
!       if (ipt.le.0) cycle
! 
!       ipt2 = nnbchr(aa,ipt+13,0,0)
!       if (aa(ipt2:ipt2).ne.'=') go to 9000
! 
!       ipt3 = nnbchr(aa,ipt2+1,0,0)
!       if (aa(ipt3:ipt3).ne.'V') go to 9001
! 
!       ipt4 = nnbchr(aa,ipt3+1,0,1)
!       if (ipt4-1 - (ipt3+1) + 1 .ne. 8) go to 9002
!       read(aa(ipt3+1:ipt4-1),'(f8.3)') rpver
! 
!       ipt5 = index(aa,'DATE')
!       if (ipt5.le.0) then
!         prdat = 'xx/xx/xx'
!         prtim = 'xx:xx:xx'
!       go to 50
!       end if
!       ipt6 = nnbchr(aa,ipt5+4,0,0)
!       if (aa(ipt6:ipt6).ne.'=') go to 9003
!       ipt7 = nnbchr(aa,ipt6+1,0,0)
!       ipt8 = nnbchr(aa,ipt7+1,0,1)
!       if (ipt8-1 - ipt7 + 1 .ne. 8) go to 9004
!       prdat = aa(ipt7:ipt8-1)
! 
!       ipt9 = nnbchr(aa,ipt8+1,0,0)
!       ipt10 = nnbchr(aa,ipt9+1,0,1)
!       if (ipt10-1 - ipt9 + 1 .ne. 8) go to 9005
!       prtim = aa(ipt9:ipt10-1)
!       write(iout,15) rpver,prdat,prtim
! 15    format('| New format PARM file being parsed.',/, &
!              '| Version = ',F8.3,' Date = ',A,' Time = ',A)
!       iprvrr = 0
!       go to 50
  
!     end do
  
  ! Get here if no VERSION flag read. Set IPRVRR = 1 and return.
  ! On subsequent calls, if IPRVRR = 1, we return immediately.
  
! 20  iprvrr = 1
!     iok = -1
!     write(iout,21)
! 21  format('|  INFO: Old style PARM file read',/)
!     fmt = fmtold
!     rewind(iunit)
!     first = .false.
!     return
  
  ! %VERSION line successfully read. Now load the flags into NXTFLG(I)
  ! and the line pointer and lengths of the flags into 
  ! INXTFL(1,I) and INXTFL(2,I), respectively. NUMFLG will be the 
  ! total number of flags read.
  
! 50  rewind(iunit)
!     numflg = 0
!     i = 1
!     do
!       read(iunit,11,end=99) aa
!       if (aa(1:5).eq.'%FLAG') then
!         numflg = numflg + 1
!         ipt2 = nnbchr(aa,6,0,0)
!         if (ipt2.eq.-1) go to 9006
!         ipt3 = nnbchr(aa,ipt2,0,1)-1
! 
!         inxtfl(1,numflg) = i
!         inxtfl(2,numflg) = ipt3-ipt2+1
!         nxtflg(numflg) = aa(ipt2:ipt3)
        end if
+       i = i + 1
+     end do
+ 99  rewind(iunit)
+     iblock = 0
+     first = .false.
+   end if
  
  ! Start search for passed flag name
! !
  ! If this is an old-style PARM file, we can't do the search. Simply
  ! set IOK = -1, FMT to FMTOLD, and return
  
!   if (iprvrr .eq. 1) then
!     iok = -1
!     fmt = fmtold
!     return
!   end if
! 
!   lflag = nnbchr(flag,1,0,1)-1
!   if (lflag.eq.-2) lflag = len(flag)
!   do i = 1,numflg
!     if (lflag.eq.inxtfl(2,i)) then
!       if (flag(1:lflag).eq.nxtflg(i)(1:lflag)) then
!         il2us = inxtfl(1,i)
!         go to 120
        end if
!     end if
!   end do
  
  ! Get here if flag does not correspond to any stored. Either stop
  ! or return depending on IONERR flag.
  
!   if (ionerr.eq.0) then
!     go to 9007
!   else if (ionerr.eq.1) then
!     iok = -2
!     return
!   end if
  
  ! Flag found. Set file pointer to the first line following the appropriate
  ! %FLAG line and then search for %FORMAT field.
***************
*** 250,352 ****
  ! If this followed the current request, rewind and read forward the
  ! necessary number of lines. This should speed things up a bit.
  
!   120 ifind = i
!       mblock = iblock
!       if (ifind.gt.iblock) then
!          do i = 1,999999
!             read(iunit,11,end=9008) aa
!             if (aa(1:5).eq.'%FLAG') then
!                mblock = mblock + 1
!                if (mblock.eq.ifind) go to 145
!             end if
!          end do
!       else
!          rewind(iunit)
!          do i = 1,il2us
!             read(iunit,11,end=9008)
!          end do
        end if
! 
!   145 do i = 1,9999999
!          read(iunit,11,end=9009) aa
!          if (aa(1:7).eq.'%FORMAT') go to 160
!       end do
  
  ! First %FORMAT found following appropriate %FLAG. Extract the
  ! format and return. All non-blank characters following %FORMAT
  ! comprise the format string (embedded blanks allowed).
  
!   160 ipt2 = nnbchr(aa,8,0,0)
!       if (ipt2.eq.-1) go to 9010
!       do i = len(aa),ipt2,-1
!          if (aa(i:i).ne.' ') go to 170
!       end do
!   170 ipt3 = i
  
  ! Format string is in IPT2:IPT3. Make sure passed FMT string is large
  ! enought to hold this and then return.
  
!       ilfo = ipt3-ipt2+1
!       if (ilfo.gt.len(fmt)) go to 9011
!       fmt = ' '
!       fmt(1:ilfo) = aa(ipt2:ipt3)
  
  ! Update IBLOCK pointer and return
  
!       iblock = ifind
!       return
  
  ! Errors:
  
!  9000 write(iout,9500)
!  9500 format('ERROR: No = sign after VERSION_STAMP field in PARM')
!       stop
!  9001 write(iout,9501)
!  9501 format('ERROR: Version number in PARM does not start with V')
!       stop
!  9002 write(iout,9502)
!  9502 format('ERROR: Mal-formed version number in PARM. ', &
               'Should be 8 chars')    
!       stop
!  9003 write(iout,9503)
!  9503 format('ERROR: No = sign after DATE field in PARM')
!       stop
!  9004 write(iout,9504)
!  9504 format('ERROR: Mal-formed date string in PARM. ', &
               'Should be 8 characters & no embedded spaces.')
!       stop
!  9005 write(iout,9505)
!  9505 format('ERROR: Mal-formed time string in PARM. ', &
               'Should be 8 characters & no embedded spaces.')
!       stop
!  9006 write(iout,9506)
!  9506 format('ERROR: No flag found following a %FLAG line in PARM')
!       stop
!  9007 write(iout,9507) flag(1:lflag)
!  9507 format('ERROR: Flag "',a,'" not found in PARM file')
!       stop
!  9008 write(iout,9508) flag(1:lflag)
!  9508 format('ERROR: Programming error in routine NXTSEC')
!       stop
!  9009 write(iout,9509) flag(1:lflag)
!  9509 format('ERROR: No %FORMAT field found following flag "',a,'"')
!       stop
!  9010 write(iout,9510) flag(1:lflag)
!  9510 format('ERROR: No format string found following a %FORMAT ', &
!              'line in PARM',/, 'Corresponding %FLAG is "',a,'"')
!       stop
!  9011 write(iout,9511) flag(1:lflag)
!  9511 format('ERROR: Format string for flag "',a,'" too large',/, &
               '       for FMT call-list parameter')
!       stop
  
  end subroutine nxtsec
  
! !*******************************************************************************
! !
  ! Function:  nnbchr
  !
! ! Description: 
  !
  ! IOPER = 0: Find next non-blank character
  ! IOPER = 1: Find next blank character
--- 272,387 ----
  ! If this followed the current request, rewind and read forward the
  ! necessary number of lines. This should speed things up a bit.
  
! 120 &
!   ifind = i
!   mblock = iblock
!   if (ifind .gt. iblock) then
!     do
!       read(iunit,11,end=9008) aa
!       if (aa(1:5) .eq. '%FLAG') then
!         mblock = mblock + 1
!         if (mblock .eq. ifind) exit
        end if
!     end do
!   else
!     rewind(iunit)
!     do i = 1,il2us
!       read(iunit,11,end=9008)
!     end do
!   end if
! 
!   do
!     read(iunit,11,end=9009) aa
!     if (aa(1:7).eq.'%FORMAT') exit
!   end do
  
  ! First %FORMAT found following appropriate %FLAG. Extract the
  ! format and return. All non-blank characters following %FORMAT
  ! comprise the format string (embedded blanks allowed).
  
!   ipt2 = nnbchr(aa,8,0,0)
!   if (ipt2.eq.-1) go to 9010
!   do i = len(aa),ipt2,-1
!     if (aa(i:i).ne.' ') exit
!   end do
!   ipt3 = i
  
  ! Format string is in IPT2:IPT3. Make sure passed FMT string is large
  ! enought to hold this and then return.
  
!   ilfo = ipt3-ipt2+1
!   if (ilfo.gt.len(fmt)) go to 9011
!   fmt = ' '
!   fmt(1:ilfo) = aa(ipt2:ipt3)
  
  ! Update IBLOCK pointer and return
  
!   iblock = ifind
!   return
  
  ! Errors:
  
! 9000 write(iout,9500)
! 9500 format('ERROR: No = sign after VERSION_STAMP field in PARM')
!   stop
! 
! 9001 write(iout,9501)
! 9501 format('ERROR: Version number in PARM does not start with V')
!   stop
! 
! 9002 write(iout,9502)
! 9502 format('ERROR: Mal-formed version number in PARM. ', &
               'Should be 8 chars')    
!   stop
! 
! 9003 write(iout,9503)
! 9503 format('ERROR: No = sign after DATE field in PARM')
!   stop
! 
! 9004 write(iout,9504)
! 9504 format('ERROR: Mal-formed date string in PARM. ', &
               'Should be 8 characters & no embedded spaces.')
!   stop
! 
! 9005 write(iout,9505)
! 9505 format('ERROR: Mal-formed time string in PARM. ', &
               'Should be 8 characters & no embedded spaces.')
!   stop
! 
! 9006 write(iout,9506)
! 9506 format('ERROR: No flag found following a %FLAG line in PARM')
!   stop
! 
! 9007 write(iout,9507) flag(1:lflag)
! 9507 format('ERROR: Flag "',A,'" not found in PARM file')
!   stop
! 
! 9008 write(iout,9508) flag(1:lflag)
! 9508 format('ERROR: Programming error in routine NXTSEC')
!   stop
! 
! 9009 write(iout,9509) flag(1:lflag)
! 9509 format('ERROR: No %FORMAT field found following flag "',a,'"')
!   stop
! 
! 9010 write(iout,9510) flag(1:lflag)
! 9510 format('ERROR: No format string found following a %FORMAT ', &
!              'line in PARM',/, &
!              'Corresponding %FLAG is "',a,'"')
!   stop
! 
! 9011 write(iout,9511) flag(1:lflag)
! 9511 format('ERROR: Format string for flag "',a,'" too large',/, &
               '       for FMT call-list parameter')
!   stop
  
  end subroutine nxtsec
  
! 
! !*******************************************************************************!
  ! Function:  nnbchr
  !
! ! Description:
  !
  ! IOPER = 0: Find next non-blank character
  ! IOPER = 1: Find next blank character
***************
*** 356,388 ****
  !   character found (IOPER = 1).
  !*******************************************************************************
  
! function nnbchr(aa,ibeg,iend,ioper)
  
!       character(*) aa
!       ibg = ibeg
!       ien = iend
!       if (ibeg.le.0) ibg = 1
!       if (iend.le.0) ien = len(aa)
! 
!       if (ioper.eq.0) then
!          do 10 i = ibg,ien
!            if (aa(i:i).ne.' ') then
!              nnbchr = i
!              return
!            end if
!    10    continue
!          nnbchr = -1
!       else if (ioper.eq.1) then
!          do 20 i = ibg,ien
!            if (aa(i:i).eq.' ') then
!              nnbchr = i
!              return
!            end if
!    20    continue
!          nnbchr = -1
        end if
  
!       return
  
  end function nnbchr
  
--- 391,438 ----
  !   character found (IOPER = 1).
  !*******************************************************************************
  
! function nnbchr(aa, ibeg, iend, ioper)
  
!   implicit none
! 
!   ! Formal arguments:
! 
!   character*(*) :: aa
!   integer       :: ibeg
!   integer       :: iend
!   integer       :: ioper
! 
!   ! Local variables:
! 
!   integer       :: nnbchr
!   integer       :: i
!   integer       :: ibg
!   integer       :: ien
! 
!   ibg = ibeg
!   ien = iend
!   if (ibeg .le. 0) ibg = 1
!   if (iend .le. 0) ien = len(aa)
! 
!   if (ioper .eq. 0) then
!     do i = ibg,ien
!       if (aa(i:i).ne.' ') then
!         nnbchr = i
!         return
!       end if
!     end do
!     nnbchr = -1
!   else if (ioper .eq. 1) then
!     do i = ibg,ien
!       if (aa(i:i) .eq. ' ') then
!         nnbchr = i
!         return
        end if
+     end do
+     nnbchr = -1
+   end if
  
!   return
  
  end function nnbchr
  
  -------------------------------------------------------------------------------
  Temporary workarounds: none

********>Bugfix 58:
Author: Bob Duke
Date: 12/08/2005

Programs: pmemd

Description: This patch is the equivalent of sander bugfixes 32, 54, and 56.

Fix: Apply the following patch to amber8/src/pmemd/src/runmd_cit.f90

------------------------------------------------------------------------------
*** src/pmemd/src/runmd_cit.f90		2004-02-09 14:03:08.000000000 -0500
--- src/pmemd/src/runmd_cit.f90    	2005-12-08 13:45:28.000000000 -0500
***************
*** 136,142 ****
    double precision      :: ecopy(51)
    double precision      :: vircopy(3)
  
-   equivalence (scaltp,     ener(5))
    equivalence (vol,        ener(10))
    equivalence (pres(1),    ener(11))
    equivalence (ekcmt(1),   ener(15))
--- 136,141 ----
***************
*** 468,473 ****
--- 467,493 ----
        end if
        call vrand_set_velocities(atm_cnt, vel, atm_mass_inv, temp0 * factt)
        if (belly) call bellyf_cit(atm_igroup, vel)
+ 
+       ! At this point in the code, the velocities lag the positions
+       ! by half a timestep.  If we intend for the velocities to be drawn
+       ! from a Maxwell distribution at the timepoint where the positions and
+       ! velocities are synchronized, we have to correct these newly
+       ! redrawn velocities by backing them up half a step using the
+       ! current force.
+       ! Note that this fix only works for Newtonian dynamics.
+ 
+       if (gammai .eq. 0.d0) then
+ #ifdef MPI
+         do atm_lst_idx = 1, my_atm_cnt
+           j = cit_my_atm_lst(atm_lst_idx)
+ #else
+         do j = 1, atm_cnt
+ #endif
+           wfac = atm_mass_inv(j) * half_dtx
+           vel(:, j) = vel(:, j) - frc(:, j) * wfac
+         end do
+       end if
+ 
      end if  ! (reset_velocities)
  
  ! Step 2: Do the velocity update:
  -------------------------------------------------------------------------------
  Temporary workarounds: none

********>Bugfix 59:
Author: Scott Brozell
Date: 01/31/2006

Programs: sander

Description: Compilation of sander with MMTSB (configure -mmtsb ...)
             will fail on platforms where Fortran generates external
             names that are not the name in lowercase with a trailing
             underscore.

Fix:  apply the following patch to amber8/src/sander/mmtsb_client.c

------------------------------------------------------------------------------
*** src/sander/mmtsb_client.c	2006-02-03 16:12:28.831254672 -0800
--- src/sander/mmtsb_client.c	2006-02-03 16:12:35.380259072 -0800
***************
*** 180,189 ****
  }
  
  
! #if defined CRAY
  void GETBIAS(double *rg, double *krg, double *rho, double *krho) {
  #else
! #if defined IBM
  void getbias(double *rg, double *krg, double *rho, double *krho) {
  #else
  void getbias_(double *rg, double *krg, double *rho, double *krho) {
--- 180,189 ----
  }
  
  
! #if defined CRAY || defined CLINK_CAPS
  void GETBIAS(double *rg, double *krg, double *rho, double *krho) {
  #else
! #if defined IBM || defined CLINK_PLAIN
  void getbias(double *rg, double *krg, double *rho, double *krho) {
  #else
  void getbias_(double *rg, double *krg, double *rho, double *krho) {
***************
*** 195,206 ****
    *krho=rhoforce;
  }
  
! #if defined CRAY
  double NEWTEMP(char *svname, char *svport, char *svid, char *jid, char *dir,
  	       double *energy, double *rg, double *rho, int *sendfiles,
  	       int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
  #else
! #if defined IBM
  double newtemp(char *svname, char *svport, char *svid, char *jid, char *dir,
  	       double *energy, double *rg, double *rho, int *sendfiles,
  	       int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
--- 195,206 ----
    *krho=rhoforce;
  }
  
! #if defined CRAY || defined CLINK_CAPS
  double NEWTEMP(char *svname, char *svport, char *svid, char *jid, char *dir,
  	       double *energy, double *rg, double *rho, int *sendfiles,
  	       int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
  #else
! #if defined IBM || defined CLINK_PLAIN
  double newtemp(char *svname, char *svport, char *svid, char *jid, char *dir,
  	       double *energy, double *rg, double *rho, int *sendfiles,
  	       int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
***************
*** 301,312 ****
  }
  
   
! #ifdef CRAY
  double NEXTCONF(char *svname, char *svport, char *svid, char *jid, char *dir,
  		double *energy, double *ecent, double *etemp, int *sendfiles,
  		int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
  #else
! #if defined IBM
  double nextconf(char *svname, char *svport, char *svid, char *jid, char *dir,
  		double *energy, double *ecent, double *etemp, int *sendfiles,
  		int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
--- 301,312 ----
  }
  
   
! #if defined CRAY || defined CLINK_CAPS
  double NEXTCONF(char *svname, char *svport, char *svid, char *jid, char *dir,
  		double *energy, double *ecent, double *etemp, int *sendfiles,
  		int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
  #else
! #if defined IBM || defined CLINK_PLAIN
  double nextconf(char *svname, char *svport, char *svid, char *jid, char *dir,
  		double *energy, double *ecent, double *etemp, int *sendfiles,
  		int lensvname, int lensvport, int lensvid, int lenjid, int lendir) {
------------------------------------------------------------------------------

Temporary workarounds: use AMBERBUILDFLAGS to define the appropriate
                       preprocessor name, e.g., make AMBERBUILDFLAGS='-DIBM'

********>Bugfix 60:
Author: Wei Zhang
Date: 03/24/2006

Programs: xleap

Description: The graphical part of xleap can fail on 64-bit machines,
             because some routines returning pointers were not properly
             prototyped, and were returning int instead.

Fix:  apply the following patch by this method:

       cd $AMBERHOME
       patch -p0 < bugfix.60 (this file)

------------------------------------------------------------------------------
Index: src/leap/src/Wc/MapAg.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Wc/MapAg.c,v
retrieving revision 7.2
diff -u -p -r7.2 MapAg.c
--- src/leap/src/Wc/MapAg.c	3 Mar 2004 20:53:10 -0000	7.2
+++ src/leap/src/Wc/MapAg.c	16 Mar 2006 23:50:21 -0000
@@ -16,6 +16,7 @@
 */
 
 #include 
+#include 
 #include "MapAgP.h"
 
 BEGIN_NOT_Cxx
Index: src/leap/src/Wc/WcSetValue.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Wc/WcSetValue.c,v
retrieving revision 7.1
diff -u -p -r7.1 WcSetValue.c
--- src/leap/src/Wc/WcSetValue.c	5 May 2003 15:40:15 -0000	7.1
+++ src/leap/src/Wc/WcSetValue.c	16 Mar 2006 23:50:21 -0000
@@ -458,27 +458,27 @@ static void WcxSetValuesFromParseResSpec
 		    for ( byte = 0 ; byte < to_val.size ; byte++ )
 			buf[byte] = converted_bytes[byte];
 
-		    switch(to_val.size)
-		    {
-		    case sizeof(char):
+                    if( to_val.size == sizeof(char) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(char*)buf );
-			break;
-#ifndef CRAY
-		    case sizeof(short):
+                    }
+                    else if( to_val.size == sizeof(short) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(short*)buf );
-			break;
-#endif
-		    case sizeof(int):
+                    }
+                    else if( to_val.size == sizeof(int) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(int*)buf );
-			break;
-#if defined(__alpha) || _MIPS_SZLONG == 64
-		    case sizeof(long):
+                    }
+                    else if( sizeof(long) > sizeof(int) && to_val.size == sizeof(long) )
+                    {
 			XtSetArg( arg[argc], spec[inx].res, *(long*)buf );
-			break;
-#endif
-		    default:
+                    }
+                    else
+                    {
 			XtSetArg( arg[argc], spec[inx].res, buf );
-		    }
+                    }
+                    
 		    argc++;
 		}
 		/* If the conversion fails, the converter issues a warning.
@@ -546,6 +546,7 @@ void WcSetValue( w, resSpec )
     {
 	stat = WcxResSpecParse(w, resSpec, &target, &res, &type, &value, &next);
 
+	
 	/* Error messages given by WcxResSpecFindSegments() via WcxBarf().
 	** We cannot continue if the parser barfs, we CAN continue if
 	** there are semantic problems detected here.
Index: src/leap/src/Xpm/parse.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xpm/parse.c,v
retrieving revision 7.0
diff -u -p -r7.0 parse.c
--- src/leap/src/Xpm/parse.c	9 Oct 1997 17:25:11 -0000	7.0
+++ src/leap/src/Xpm/parse.c	16 Mar 2006 23:50:21 -0000
@@ -42,6 +42,7 @@ char *xpmColorKeys[] = {
     "c",				/* key #5: color visual */
 };
 
+unsigned int atoui( char* p, unsigned int l, unsigned int *ui_return );
 
 /* function call in case of error, frees only locally allocated variables */
 #undef RETURN
Index: src/leap/src/Xpm/xpmP.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xpm/xpmP.h,v
retrieving revision 7.0
diff -u -p -r7.0 xpmP.h
--- src/leap/src/Xpm/xpmP.h	9 Oct 1997 17:25:11 -0000	7.0
+++ src/leap/src/Xpm/xpmP.h	16 Mar 2006 23:50:21 -0000
@@ -22,6 +22,7 @@
 #else  /* VMS */
 
 #include 
+#include 
 /* stdio.h doesn't declare popen on a Sequent DYNIX OS */
 #ifdef sequent
 extern FILE *popen();
Index: src/leap/src/Xraw/Arrow.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/Arrow.c,v
retrieving revision 1.2
diff -u -p -r1.2 Arrow.c
--- src/leap/src/Xraw/Arrow.c	5 May 2003 15:40:17 -0000	1.2
+++ src/leap/src/Xraw/Arrow.c	16 Mar 2006 23:50:21 -0000
@@ -14,7 +14,7 @@
 #include "ArrowP.h"
 
 #include "XrawDebug.h"
-
+#include "../Xmu/CharSet.h"
 
 #define CORE(w) (w)->core
 
Index: src/leap/src/Xraw/AsciiSrc.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/AsciiSrc.c,v
retrieving revision 1.3
diff -u -p -r1.3 AsciiSrc.c
--- src/leap/src/Xraw/AsciiSrc.c	5 May 2003 15:40:17 -0000	1.3
+++ src/leap/src/Xraw/AsciiSrc.c	16 Mar 2006 23:50:21 -0000
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-    
+#include     
 #include 
 #include 
 
Index: src/leap/src/Xraw/Scrollbar.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/Scrollbar.c,v
retrieving revision 1.2
diff -u -p -r1.2 Scrollbar.c
--- src/leap/src/Xraw/Scrollbar.c	5 May 2003 15:40:19 -0000	1.2
+++ src/leap/src/Xraw/Scrollbar.c	16 Mar 2006 23:50:21 -0000
@@ -1092,7 +1092,7 @@ static void Select( gw, event, params, n
 
     BAR(w).newLoc = newLoc;
     
-    PaintThumb(w, (Region)NULL, LOCATION);
+    PaintThumb(gw, (Region)NULL, LOCATION);
     PaintArrows(gw, Xaw_DOWN, (unsigned int)Xaw_BOTTOM);
     
     FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_INCREMENT, event);
@@ -1189,7 +1189,7 @@ static void Select( gw, event, params, n
 
     BAR(w).newLoc = newLoc;
     
-    PaintThumb(w, (Region)NULL, LOCATION);
+    PaintThumb(gw, (Region)NULL, LOCATION);
     PaintArrows(gw, Xaw_DOWN, (unsigned int)Xaw_TOP);
     
     FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_DECREMENT, event);
@@ -1440,7 +1440,7 @@ static void PageUpOrLeft( gw, event, par
 
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
 
   FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_PAGE_DECREMENT, event);
 
@@ -1486,7 +1486,7 @@ static void PageDownOrRight( gw, event, 
 
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
 
   FillXawScrollBarCallbackStruct(gw, (XawScrollBarCallbackStruct*)&bar_data,
 				 XawSB_PAGE_INCREMENT, event);
@@ -1530,7 +1530,7 @@ static void IncrementUpOrLeft( gw, event
   
   BAR(w).newLoc = newLoc;
   
-  PaintThumb(w, (Region)NULL, LOCATION);
+  PaintThumb(gw, (Region)NULL, LOCATION);
   
   FillXawScrollBarCallbackStruct(gw, &bar_data, XawSB_DECREMENT, event);
 
Index: src/leap/src/Xraw/ScrolledTable.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/ScrolledTable.h,v
retrieving revision 1.2
diff -u -p -r1.2 ScrolledTable.h
--- src/leap/src/Xraw/ScrolledTable.h	5 May 2003 15:40:19 -0000	1.2
+++ src/leap/src/Xraw/ScrolledTable.h	16 Mar 2006 23:50:21 -0000
@@ -96,6 +96,7 @@ Commercial  usage is  also  possible  wi
 /*#                                                                       #*/
 /*#########################################################################*/
 extern WidgetClass scrolledTableWidgetClass;
+extern void XawScrolledTableSetLocation( Widget w, double xoff, double yoff );
 
 typedef struct _ScrolledTableClassRec *XrawScrolledTableWidgetClass;
 typedef struct _ScrolledTableRec      *XrawScrolledTableWidget;
Index: src/leap/src/Xraw/TextSink.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/Xraw/TextSink.c,v
retrieving revision 1.3
diff -u -p -r1.3 TextSink.c
--- src/leap/src/Xraw/TextSink.c	5 May 2003 15:40:21 -0000	1.3
+++ src/leap/src/Xraw/TextSink.c	16 Mar 2006 23:50:21 -0000
@@ -197,14 +197,16 @@ Widget request, new;
  */
 
 static void
-Destroy(w)
+Destroy(Widget w)
 {
   TextSinkObject sink = (TextSinkObject) w;
 
   if (sink->text_sink.char_tabs != NULL)
     XtFree((char *) sink->text_sink.char_tabs);
+  
   if (sink->text_sink.tabs != NULL)
     XtFree((char *) sink->text_sink.tabs);
+
 }
 
 /*	Function Name: SetValues
Index: src/leap/src/leap/amber.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/amber.c,v
retrieving revision 7.18
diff -u -p -r7.18 amber.c
--- src/leap/src/leap/amber.c	23 May 2005 16:53:34 -0000	7.18
+++ src/leap/src/leap/amber.c	16 Mar 2006 23:50:21 -0000
@@ -43,6 +43,8 @@
 #include	"tools.h"
 #include	"amber.h"
 #include	"defaults.h"
+#include        "sort.h"
+#include        "zMatrix.h"
 
 #define FGETS(s,f)      { strcpy(s,""); fgets(s,sizeof(s),f); }
 
Index: src/leap/src/leap/atom.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/atom.h,v
retrieving revision 7.4
diff -u -p -r7.4 atom.h
--- src/leap/src/leap/atom.h	14 Jan 2002 01:29:41 -0000	7.4
+++ src/leap/src/leap/atom.h	16 Mar 2006 23:50:21 -0000
@@ -297,5 +297,6 @@ extern BOOL		bAtomSpaceConflict( ATOM aA
 extern double		dAtomVanderWaals( ATOM aAtom );
 extern int		iAtomSetTmpRadius( ATOM aAtom );
 
+extern void             AtomBondTo( ATOM aAtom1, ATOM aAtom2 );
 
 #endif /* ATOM_H */
Index: src/leap/src/leap/basics.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/basics.h,v
retrieving revision 7.14
diff -u -p -r7.14 basics.h
--- src/leap/src/leap/basics.h	13 Mar 2004 03:28:05 -0000	7.14
+++ src/leap/src/leap/basics.h	16 Mar 2006 23:50:21 -0000
@@ -641,8 +641,8 @@ extern BOOL     GbTestMemory;
 #include        "byteArray.h"
 */
 
-
-
+extern void            IMem();
+extern void            TMem();
 /*  sysdepend.c  */
 
 extern void             myPrintf(char *fmt,...);
Index: src/leap/src/leap/block.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/block.h,v
retrieving revision 7.1
diff -u -p -r7.1 block.h
--- src/leap/src/leap/block.h	10 Apr 1999 04:21:06 -0000	7.1
+++ src/leap/src/leap/block.h	16 Mar 2006 23:50:21 -0000
@@ -93,6 +93,6 @@ extern BOOL		bBlockRemoveChar( BLOCK bBl
 extern void		BlockEmpty( BLOCK bBlock );
 extern void		BlockDestroy( BLOCK *bPBlock );
 extern BOOL		bBlockReadLine( BLOCK bBlock, char *sLine );
-
+extern BOOL             bBlockAddChar( BLOCK bBlock, char c );
 
 #endif
Index: src/leap/src/leap/build.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/build.c,v
retrieving revision 7.7
diff -u -p -r7.7 build.c
--- src/leap/src/leap/build.c	6 Jan 2000 17:21:26 -0000	7.7
+++ src/leap/src/leap/build.c	16 Mar 2006 23:50:21 -0000
@@ -58,7 +58,8 @@
 #include	"parmLib.h"
 #include        "model.h"
 #include        "build.h"
-
+#include        "sort.h"
+#include        "graphUtil.h"
 
 #define         MAXNEWTONSTEPS  20
 
Index: src/leap/src/leap/build.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/build.h,v
retrieving revision 7.2
diff -u -p -r7.2 build.h
--- src/leap/src/leap/build.h	21 Sep 1999 21:00:57 -0000	7.2
+++ src/leap/src/leap/build.h	16 Mar 2006 23:50:21 -0000
@@ -38,7 +38,9 @@
 #ifndef	BUILD_H
 #define	BUILD_H
 
-
+#include "classes.h"
+#include "minimizer.h"
+#include "loop.h"
 /*  build.c  */
 
 extern void		BuildInternalsUsingFlags( LOOP *lPAtoms, FLAGS fForSet, 
Index: src/leap/src/leap/commands.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/commands.c,v
retrieving revision 7.52
diff -u -p -r7.52 commands.c
--- src/leap/src/leap/commands.c	29 Mar 2005 23:53:31 -0000	7.52
+++ src/leap/src/leap/commands.c	16 Mar 2006 23:50:21 -0000
@@ -73,6 +73,9 @@
 #include        "leap.h"
 #include        "octree.h"
 #include        "tripos.h"
+#include        "build.h"
+#include        "zMatrix.h"
+#include        "unitio.h"
 
 int     iMemDebug = 0;
 
@@ -5126,7 +5129,11 @@ OctTreePrintGrid( octTreeSolute, "Charge
                  *  Make a copy of ion unit and give it new point.
                  */
                 uPlace = (UNIT) oCopy( (OBJEKT)uIon1 );
-                ContainerCenterAt( (CONTAINER) uPlace, vNewPoint );
+                lAtoms = lLoop( (OBJEKT)uPlace, ATOMS );
+                aAtom  = (ATOM)oNext(&lAtoms);
+                AtomSetPosition( aAtom, vNewPoint );
+                AtomSetFlags( aAtom, ATOMPOSITIONKNOWN );
+                // ContainerCenterAt( (CONTAINER) uPlace, vNewPoint );
 
                 /*
                  *  Add ion to solute.
Index: src/leap/src/leap/commands.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/commands.h,v
retrieving revision 7.2
diff -u -p -r7.2 commands.h
--- src/leap/src/leap/commands.h	12 Jul 2001 22:31:25 -0000	7.2
+++ src/leap/src/leap/commands.h	16 Mar 2006 23:50:21 -0000
@@ -1,5 +1,6 @@
 /*
  *      File:   commands.h
+ * B
  *
  ************************************************************************
  *                            LEAP                                      *
@@ -66,5 +67,10 @@ typedef struct {
 typedef ALIASt	*ALIAS;
 
 extern	VARARRAY	GvaAlias;
-	
+
+OBJEKT
+oCmd_charge( int, ASSOC* );
+
+OBJEKT
+oCmd_check( int, ASSOC* );
 #endif
Index: src/leap/src/leap/database.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/database.c,v
retrieving revision 7.6
diff -u -p -r7.6 database.c
--- src/leap/src/leap/database.c	6 Jun 2002 15:49:56 -0000	7.6
+++ src/leap/src/leap/database.c	16 Mar 2006 23:50:21 -0000
@@ -111,6 +111,8 @@
 
 #include        "database.h"
 
+#include 	"stringExtra.h"
+
 #define TOTALCOLUMNS    16              /* Total number of columns allowed */
 
 #define ENTRYINTEGERSTR "int"
Index: src/leap/src/leap/fortran.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/fortran.c,v
retrieving revision 7.1
diff -u -p -r7.1 fortran.c
--- src/leap/src/leap/fortran.c	11 Apr 1999 05:35:06 -0000	7.1
+++ src/leap/src/leap/fortran.c	16 Mar 2006 23:50:21 -0000
@@ -63,7 +63,7 @@
 
 #include	"basics.h"
 
-
+#include        "stringExtra.h"
 
 
 /*
Index: src/leap/src/leap/graphUtil.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/graphUtil.c,v
retrieving revision 7.2
diff -u -p -r7.2 graphUtil.c
--- src/leap/src/leap/graphUtil.c	15 Jun 1999 00:34:08 -0000	7.2
+++ src/leap/src/leap/graphUtil.c	16 Mar 2006 23:50:21 -0000
@@ -49,7 +49,7 @@
 
 #include	"graphUtil.h"
 
-
+#include        "sort.h"
 
 
 /*
@@ -92,6 +92,8 @@ BOOL		bFound;
 	}
 	fPCallback( aStart );
     }
+
+    return bFound;
 }
 
 
Index: src/leap/src/leap/help.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/help.h,v
retrieving revision 7.2
diff -u -p -r7.2 help.h
--- src/leap/src/leap/help.h	15 Jun 1999 03:57:56 -0000	7.2
+++ src/leap/src/leap/help.h	16 Mar 2006 23:50:21 -0000
@@ -59,7 +59,7 @@ typedef HELPt*  HELP;
 
 extern void	HelpInitialize();
 extern void	HelpShutdown();
-
+extern void     HTInit();
 extern void	HelpLoop();
 extern HELP	hHelpNext();
 
Index: src/leap/src/leap/minimizer.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/minimizer.h,v
retrieving revision 7.2
diff -u -p -r7.2 minimizer.h
--- src/leap/src/leap/minimizer.h	13 Apr 1999 00:32:08 -0000	7.2
+++ src/leap/src/leap/minimizer.h	16 Mar 2006 23:50:21 -0000
@@ -45,7 +45,8 @@
 #ifndef VARARRAY_H
 #include        "varArray.h"
 #endif
- 
+#include        "atom.h"
+
 typedef struct  {
 	double          dMinRmsGradientSquared;
 	VARARRAY        vaAtoms;
Index: src/leap/src/leap/model.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/model.c,v
retrieving revision 7.5
diff -u -p -r7.5 model.c
--- src/leap/src/leap/model.c	6 Jan 2000 17:21:27 -0000	7.5
+++ src/leap/src/leap/model.c	16 Mar 2006 23:50:21 -0000
@@ -50,7 +50,11 @@ int		this = 0;
 
 #include        "model.h"
 
+#include        "sort.h"
 
+#include        "atom.h"
+
+#include        "zMatrix.h"
 
 
 
Index: src/leap/src/leap/molecule.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/molecule.h,v
retrieving revision 7.1
diff -u -p -r7.1 molecule.h
--- src/leap/src/leap/molecule.h	13 Apr 1999 01:57:32 -0000	7.1
+++ src/leap/src/leap/molecule.h	16 Mar 2006 23:50:21 -0000
@@ -83,7 +83,7 @@ typedef MOLECULEt	*MOLECULE;
 extern MOLECULE		mMoleculeCreate();
 extern void		MoleculeDelete(MOLECULE *mPMolecule);
 extern void		MoleculeDescribe(MOLECULE mMolecule);
-
+extern void             MoleculeDestroy(MOLECULE *mPMolecule);
 extern MOLECULE		mMoleculeDuplicate(MOLECULE mOld);
 extern void		MoleculeResetPointers(MOLECULE mMol);
 extern void		MoleculeCheck(MOLECULE mMol, int *iPErrors, int *iPWarnings);
Index: src/leap/src/leap/objekt.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/objekt.c,v
retrieving revision 7.2
diff -u -p -r7.2 objekt.c
--- src/leap/src/leap/objekt.c	12 Sep 1999 01:03:27 -0000	7.2
+++ src/leap/src/leap/objekt.c	16 Mar 2006 23:50:21 -0000
@@ -195,7 +195,6 @@ OBJEKT  o;
 void
 Destroy( OBJEKT  *oPObject )
 {
-
     if ( *oPObject == NULL ) 
 	return;
 
@@ -254,6 +253,7 @@ Destroy( OBJEKT  *oPObject )
 		*oPObject ));
             break;
     }
+    
 }
 
 
Index: src/leap/src/leap/parser.y
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/parser.y,v
retrieving revision 7.9
diff -u -p -r7.9 parser.y
--- src/leap/src/leap/parser.y	6 Nov 2002 16:05:41 -0000	7.9
+++ src/leap/src/leap/parser.y	16 Mar 2006 23:50:21 -0000
@@ -84,7 +84,9 @@
 #include	"parser.h"
 
 #include        "leap.h"
+#include        "block.h"
 
+#include        "help.h"
 
 #define         MESSAGEFILTER   MESSPARSER
 
Index: src/leap/src/leap/pdbFile.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/pdbFile.c,v
retrieving revision 7.20
diff -u -p -r7.20 pdbFile.c
--- src/leap/src/leap/pdbFile.c	17 May 2002 01:07:48 -0000	7.20
+++ src/leap/src/leap/pdbFile.c	16 Mar 2006 23:50:21 -0000
@@ -52,7 +52,8 @@
 #include        "minimizer.h"
 #include        "leap.h"
 #include	"defaults.h"
-
+#include        "build.h"
+#include        "atom.h"
 
 		/* PDBWRITEt is used to store data for writing PDB files */
 
Index: src/leap/src/leap/residue.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/residue.c,v
retrieving revision 7.7
diff -u -p -r7.7 residue.c
--- src/leap/src/leap/residue.c	12 Feb 2001 09:16:57 -0000	7.7
+++ src/leap/src/leap/residue.c	16 Mar 2006 23:50:21 -0000
@@ -57,6 +57,7 @@
 
 #include        "classes.h"
 
+#include        "build.h"
 
 /*
  *----------------------------------------------------------
@@ -408,8 +409,8 @@ FLAGS		fBondFlags;
 			ATOMPOSITIONKNOWN, 
 			0,
 			0, 
-			ATOMPOSITIONKNOWN,
-			&iDum, &iDum, &iDum );
+			ATOMPOSITIONKNOWN
+			);
 
                 /* Define the coordinates, and the flags */
                 /* if there are bonds out of the old RESIDUE, break them */
Index: src/leap/src/leap/residue.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/residue.h,v
retrieving revision 7.4
diff -u -p -r7.4 residue.h
--- src/leap/src/leap/residue.h	19 Jun 2002 16:41:57 -0000	7.4
+++ src/leap/src/leap/residue.h	16 Mar 2006 23:50:21 -0000
@@ -154,7 +154,7 @@ typedef struct {
 extern RESIDUE		rResidueCreate();
 extern void		ResidueDelete(RESIDUE *rPResidue);
 extern void		ResidueDescribe(RESIDUE rResidue);
-
+extern void             ResidueDestroy(RESIDUE *rPResidue);
 extern RESIDUE		rResidueDuplicate(RESIDUE rOld);
 extern void		ResidueResetPointers(RESIDUE rRes);
 extern void		ResidueCheck(RESIDUE rRes, 
Index: src/leap/src/leap/select.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/select.c,v
retrieving revision 7.1
diff -u -p -r7.1 select.c
--- src/leap/src/leap/select.c	15 Jun 1999 00:35:56 -0000	7.1
+++ src/leap/src/leap/select.c	16 Mar 2006 23:50:21 -0000
@@ -46,6 +46,9 @@
 
 #include	"select.h"
 
+#include        "graphUtil.h"
+
+#include        "build.h"
 
 /*
  *	SelectAtom
Index: src/leap/src/leap/select.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/select.h,v
retrieving revision 7.1
diff -u -p -r7.1 select.h
--- src/leap/src/leap/select.h	15 Jun 1999 03:58:05 -0000	7.1
+++ src/leap/src/leap/select.h	16 Mar 2006 23:50:21 -0000
@@ -45,6 +45,7 @@ extern void	SelectMoleculeWithAtom(UNIT 
 extern void	SelectEverything(UNIT uUnit, BOOL bOn);
 extern void	SelectChainBetween(UNIT uUnit, ATOM aA, ATOM aB, BOOL bOn);
 extern void	SelectRelaxInFramework(UNIT uUnit, MINIMIZER mMinimizer);
+extern BOOL     bSelectChainBetween( UNIT uUnit, ATOM aA, ATOM aB, BOOL bOn );
 
 #define	SelectSetFlags(u,f)	ContainerWithFlagsSetAtomFlags(u,ATOMSELECTED,f)
 #define	SelectResetFlags(u,f)\
Index: src/leap/src/leap/tLeap.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tLeap.c,v
retrieving revision 7.2
diff -u -p -r7.2 tLeap.c
--- src/leap/src/leap/tLeap.c	15 Jun 1999 03:58:06 -0000	7.2
+++ src/leap/src/leap/tLeap.c	16 Mar 2006 23:50:21 -0000
@@ -91,7 +91,7 @@
 
 #include        "getline.h"
 
-
+#include        "block.h"
 /*
  *******************************************************************
  *
@@ -101,7 +101,9 @@
  *      Amended: Vladimir Romanovski (1994)
  *        It was added the ``input-edit'' library facility.
  */
-
+void ParseInit( RESULTt *rPResult );
+void ParseArguments( int argc, char *argv[] );
+void ParseShutdown();
 static char *
 stripwhite (char *string)
 {
Index: src/leap/src/leap/tools.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tools.c,v
retrieving revision 7.21
diff -u -p -r7.21 tools.c
--- src/leap/src/leap/tools.c	20 Feb 2004 20:39:15 -0000	7.21
+++ src/leap/src/leap/tools.c	16 Mar 2006 23:50:21 -0000
@@ -59,7 +59,9 @@
 
 #include        "tools.h"
 
+#include        "mathop.h"
 
+#include        "sort.h"
 /*
  *      dToolAtomR
  *
Index: src/leap/src/leap/tools.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/tools.h,v
retrieving revision 7.3
diff -u -p -r7.3 tools.h
--- src/leap/src/leap/tools.h	10 Aug 1999 08:47:44 -0000	7.3
+++ src/leap/src/leap/tools.h	16 Mar 2006 23:50:21 -0000
@@ -75,5 +75,6 @@ extern BOOL	bToolGeometricCenter( OBJEKT
 extern LIST	lToolListOfResidues( UNIT uUnit, LIST lResidues );
 extern void	ToolOctBoxCheck( UNIT uSolute, double *dPBuf, BOOL bMsg );
 
+extern void     ToolSetUnitBoxByCenters( UNIT uUnit );
 
 
Index: src/leap/src/leap/unit.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unit.c,v
retrieving revision 7.17
diff -u -p -r7.17 unit.c
--- src/leap/src/leap/unit.c	2 Jul 2004 00:27:04 -0000	7.17
+++ src/leap/src/leap/unit.c	16 Mar 2006 23:50:21 -0000
@@ -70,7 +70,6 @@
         Type definitions, static variables etc.
 */
 
-BOOL zbUnitIgnoreAngle();
 
 /*
  *----------------------------------------------------------------------
Index: src/leap/src/leap/unit.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unit.h,v
retrieving revision 7.4
diff -u -p -r7.4 unit.h
--- src/leap/src/leap/unit.h	2 Aug 2001 15:02:39 -0000	7.4
+++ src/leap/src/leap/unit.h	16 Mar 2006 23:50:21 -0000
@@ -205,8 +205,9 @@ extern void	UnitFindBoundingBox(UNIT uUn
 extern void	UnitSetUseBox(UNIT uUnit, BOOL b);
 extern void	UnitSetBoxOct(UNIT uUnit, BOOL b);
 extern void	UnitSetUseSolventCap(UNIT uUnit, BOOL b);
-
+extern void     UnitDestroy( UNIT *uPUnit );
 extern BOOL	zbUnitIgnoreHwHwOwAngle( STRING sA, STRING sB, STRING sC );
+extern BOOL     zbUnitIgnoreAngle( STRING sA, STRING sB, STRING sC );
 
 #define UnitUseParameters( u, p ) \
 	( ((UNIT)(u))->psParameters = (OBJEKT)(p),CDU(u) )
Index: src/leap/src/leap/unitio.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/unitio.c,v
retrieving revision 7.44
diff -u -p -r7.44 unitio.c
--- src/leap/src/leap/unitio.c	21 Apr 2004 18:42:22 -0000	7.44
+++ src/leap/src/leap/unitio.c	16 Mar 2006 23:50:21 -0000
@@ -77,6 +77,9 @@
 #include        "avl.h"
 #include	"defaults.h"
 
+#include        "fortran.h"
+#include        "mathop.h"
+#include        "sort.h"
 int iFatal;
 
 /*
Index: src/leap/src/leap/xAction.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xAction.c,v
retrieving revision 7.9
diff -u -p -r7.9 xAction.c
--- src/leap/src/leap/xAction.c	20 Feb 2004 22:21:00 -0000	7.9
+++ src/leap/src/leap/xAction.c	16 Mar 2006 23:50:21 -0000
@@ -49,7 +49,7 @@
 #include        "basics.h"
 
 
-
+#include        "build.h"
 #include        "vector.h"
 #include        "matrix.h"
 #include        "threed.h"
@@ -1265,7 +1265,7 @@ zActionHandlePointerMove( TANK tTank, in
         case TANKDRAGROTATE:
             if ( tTank->tank.iButtonState == BPOINT ) {
                 zActionDrag( tTank );
-            } else if ( tTank->tank.iButtonState = BSHIFT_POINT ) {
+            } else if ( tTank->tank.iButtonState == BSHIFT_POINT ) {
                 zActionRotateAtoms(tTank);
             }
             goto DONE;
@@ -1945,6 +1945,8 @@ xtapActionCenterUnit( Widget wWidget, XE
     TankDisplay( (TANK)wWidget, FALSE );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -1957,6 +1959,8 @@ xtapActionSetCancelHit( Widget wWidget, 
 
     MESSAGE(( "ActionSetCancelHit\n" ));
     BasicsSetInterrupt();
+
+    return NULL;
 }
 
 
@@ -1986,6 +1990,8 @@ xtapActionMouseMotion( Widget wWidget, X
     ActionButtonMotion( wWidget, xePEvent->xbutton.x, xePEvent->xbutton.y );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2009,6 +2015,8 @@ xtapActionButtonADown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2029,6 +2037,8 @@ xtapActionButtonAUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2054,6 +2064,8 @@ xtapActionButtonBDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2075,6 +2087,8 @@ xtapActionButtonBUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2099,6 +2113,8 @@ xtapActionButtonCDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2118,6 +2134,8 @@ xtapActionButtonCUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2142,6 +2160,8 @@ xtapActionButtonDDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2161,6 +2181,8 @@ xtapActionButtonDUp( Widget wWidget, XEv
                         xePEvent->xbutton.x, xePEvent->xbutton.y,
                         xePEvent->xbutton.time );
     PopCurrentPrintSink();
+ 
+    return NULL;
 }
 
 
@@ -2187,6 +2209,8 @@ xtapActionButtonEDown( Widget wWidget, X
                                 xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
@@ -2207,6 +2231,8 @@ xtapActionButtonEUp( Widget wWidget, XEv
                         xePEvent->xbutton.time );
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xTank.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xTank.c,v
retrieving revision 7.7
diff -u -p -r7.7 xTank.c
--- src/leap/src/leap/xTank.c	19 Feb 2004 03:13:26 -0000	7.7
+++ src/leap/src/leap/xTank.c	16 Mar 2006 23:50:21 -0000
@@ -2175,6 +2175,7 @@ XSetWindowAttributes    xswaWin;
 
     X3dBuildTransform( tTank->tank.x3dEngine );
     TankDisplay( tTank , FALSE );
+    return NULL;
 }
 
 
@@ -2261,6 +2262,7 @@ TankCreate( Widget wRequest, TANK tTank 
 
     tTank->tank.bPageFlipFront = TRUE;
     tTank->tank.bFastPageFlipLastTime = FALSE;  /* guess */
+    return NULL;
 }
 
 
@@ -2289,6 +2291,8 @@ TankDestroy( TANK tTank )
     if ( tTank->tank.vaAtomPtrs != NULL ) {
         VarArrayDestroy(&(tTank->tank.vaAtomPtrs) );
     }
+
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xaAngleParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaAngleParmTable.c,v
retrieving revision 7.3
diff -u -p -r7.3 xaAngleParmTable.c
--- src/leap/src/leap/xaAngleParmTable.c	7 Aug 2000 21:25:07 -0000	7.3
+++ src/leap/src/leap/xaAngleParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -51,6 +51,9 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
+
+#include        "../Wc/WcCreate.h"
 
 #define TYPE1C		0
 #define	TYPE2C		1
Index: src/leap/src/leap/xaAtomTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaAtomTable.c,v
retrieving revision 7.8
diff -u -p -r7.8 xaAtomTable.c
--- src/leap/src/leap/xaAtomTable.c	2 Mar 2004 02:01:55 -0000	7.8
+++ src/leap/src/leap/xaAtomTable.c	16 Mar 2006 23:50:21 -0000
@@ -56,7 +56,7 @@
 
 #include        "xaTable.h"
 #include        "xaAtomTable.h"
-
+#include        "../Wc/WcCreate.h"
 
 #define NAMEC           0
 #define TYPEC           1
@@ -512,6 +512,7 @@ static char *
 zXAATBeginAcceptTable( TABLE tTable )
 {
     DisplayerAccumulateUpdates();
+    return NULL;
 }
 
 
@@ -527,6 +528,7 @@ static char *
 zXAATEndAcceptTable( TABLE tTable )
 {
     DisplayerReleaseUpdates();
+    return NULL;
 }
 
 
Index: src/leap/src/leap/xaBondParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaBondParmTable.c,v
retrieving revision 7.2
diff -u -p -r7.2 xaBondParmTable.c
--- src/leap/src/leap/xaBondParmTable.c	26 May 1999 20:35:43 -0000	7.2
+++ src/leap/src/leap/xaBondParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -52,6 +52,7 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
 
 #define TYPE1C		0
 #define	TYPE2C		1
Index: src/leap/src/leap/xaCommand.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaCommand.c,v
retrieving revision 7.6
diff -u -p -r7.6 xaCommand.c
--- src/leap/src/leap/xaCommand.c	5 May 2003 15:40:22 -0000	7.6
+++ src/leap/src/leap/xaCommand.c	16 Mar 2006 23:50:21 -0000
@@ -66,14 +66,14 @@
 
 #include	"xaCommand.h"
 
+#include        "../Wc/WcCreate.h"
 
 #define	EMPTY_LIST	"      "
 #define	XACEMPTYSTRING	"";
 
 extern BLOCK	GbCommand;
 
-extern Widget	WcFullNameToWidget();
-
+extern void ParseBlock( BLOCK bBlock, RESULTt* rPResult );
 	    
 /*
  *	zXACDisplayChildren
Index: src/leap/src/leap/xaHBondParmTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaHBondParmTable.c,v
retrieving revision 7.2
diff -u -p -r7.2 xaHBondParmTable.c
--- src/leap/src/leap/xaHBondParmTable.c	26 May 1999 22:56:56 -0000	7.2
+++ src/leap/src/leap/xaHBondParmTable.c	16 Mar 2006 23:50:21 -0000
@@ -53,6 +53,8 @@
 
 #include	"xaTable.h"
 
+#include        "../Xraw/table.h"
+
 #define TYPE1C		0
 #define	TYPE2C		1
 #define	AC		2
Index: src/leap/src/leap/xaLeapc.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaLeapc.c,v
retrieving revision 7.9
diff -u -p -r7.9 xaLeapc.c
--- src/leap/src/leap/xaLeapc.c	27 Oct 2003 23:01:01 -0000	7.9
+++ src/leap/src/leap/xaLeapc.c	16 Mar 2006 23:50:21 -0000
@@ -71,7 +71,8 @@
 
 #include	"parser.h"
 #include        "block.h"
-
+#include        "../Xraw/Command.h"
+#include        "../Xraw/3d.h"
 #define ICON_NAME ("xleap_icon")
 
 extern VFUNCTION	GfAtomClassGraphicsCreator;
@@ -79,6 +80,10 @@ extern VFUNCTION	GfAtomClassGraphicsDest
 
 static int error_handler();
 
+void ParseInit( RESULTt *rPResult );
+void ParseArguments( int argc, char *argv[] );
+void ParseShutdown();
+void XAPEInitialize( XtAppContext app );
 
 /*
  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -102,7 +107,7 @@ GC              GgcLight;
 FILE           	*GfInput;
 
 static
-SetCommandColoursCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetCommandColoursCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char	*param = (char*)client_data;
   Pixel  background = 0;
@@ -123,7 +128,7 @@ SetCommandColoursCB( Widget w, XtPointer
 }
 
 static
-SetSensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetSensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char		*param = (char*)client_data;
   Widget	to_set;
@@ -141,7 +146,7 @@ SetSensitiveCB( Widget w, XtPointer clie
 }
 
 static
-SetInsensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
+void SetInsensitiveCB( Widget w, XtPointer client_data, XtPointer call_data)
 {
   char		*param = (char*)client_data;
   Widget	to_set;
Index: src/leap/src/leap/xaParmEditor.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaParmEditor.c,v
retrieving revision 7.1
diff -u -p -r7.1 xaParmEditor.c
--- src/leap/src/leap/xaParmEditor.c	27 May 1999 01:38:59 -0000	7.1
+++ src/leap/src/leap/xaParmEditor.c	16 Mar 2006 23:50:21 -0000
@@ -73,7 +73,7 @@
 #include	"xaAngleParmTable.h"
 #include	"xaTorsionParmTable.h"
 #include	"xaHBondParmTable.h"
-
+#include        "../Wc/WcCreate.h"
 
 typedef	struct	{
 	Widget		wTop;
@@ -235,7 +235,7 @@ XAPEEditAtomParameters( Widget wCur, cad
   } else {
     MESSAGE(( "Creating Atom Parameter Table..." ));		
     XAAPTPopupTable( wCur, zwXAPETop(wCur), zpsXAPEParmSet( wCur ) ,
-		    zXAPEEditDone );
+	  zXAPEEditDone );
   }
 }
 
Index: src/leap/src/leap/xaTable.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTable.c,v
retrieving revision 7.10
diff -u -p -r7.10 xaTable.c
--- src/leap/src/leap/xaTable.c	2 Mar 2004 23:06:15 -0000	7.10
+++ src/leap/src/leap/xaTable.c	16 Mar 2006 23:50:21 -0000
@@ -51,6 +51,7 @@
 #include        "../Xraw/Scrollbar.h"
 #include        "../Xraw/Table2.h"
 #include        "../Wc/WcCreate.h"
+#include        "../Xraw/3d.h"
 
 #include        "basics.h"
 #include        "varArray.h"
@@ -546,6 +547,7 @@ XATSetWidgetFind(Widget wWid, caddr_t cl
 
     tTable->wFind = wWid;
 
+    return NULL;
 }
 
 /********************************************************************
@@ -565,6 +567,8 @@ XATVerifyChangedCell(Widget wWid, caddr_
 
     tTable->bTableChanged = TRUE;
 /* %%% TODO - call VerifyCell */
+
+    return NULL;
 }
 
 /********************************************************************
@@ -598,6 +602,8 @@ XATVerifyAddRow(Widget wWid, caddr_t cli
         tTable->find_row++;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -634,6 +640,8 @@ XATVerifyDeleteRow(Widget wWid, caddr_t 
         tTable->find_column = tTable->find_row = 0;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -669,6 +677,8 @@ XATAddRow(Widget wWid, caddr_t client_da
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -707,6 +717,8 @@ XATInsertRow(Widget wWid, caddr_t client
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
@@ -740,6 +752,8 @@ XATDeleteRow(Widget wWid, caddr_t client
     tTable->bTableChanged = TRUE;
 
     PopCurrentPrintSink();
+
+    return NULL;
 }
 
 /********************************************************************
Index: src/leap/src/leap/xaTable.h
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTable.h,v
retrieving revision 7.3
diff -u -p -r7.3 xaTable.h
--- src/leap/src/leap/xaTable.h	2 Mar 2004 02:01:55 -0000	7.3
+++ src/leap/src/leap/xaTable.h	16 Mar 2006 23:50:21 -0000
@@ -48,6 +48,8 @@
 
 #include "varArray.h"
 #include "xaLeap.h"
+#include "varArray.h"
+
 
 typedef char*   (*SFUNCTION)();
 typedef struct  {
Index: src/leap/src/leap/xaTools.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaTools.c,v
retrieving revision 7.3
diff -u -p -r7.3 xaTools.c
--- src/leap/src/leap/xaTools.c	20 Jul 1999 03:43:21 -0000	7.3
+++ src/leap/src/leap/xaTools.c	16 Mar 2006 23:50:21 -0000
@@ -47,7 +47,7 @@
 
 #include	"xaLeap.h"
 #include	"xaTools.h"
-
+#include        "../Wc/WcCreate.h"
 
 /*
  *------------------------------------------------------------
Index: src/leap/src/leap/xaUnitEditor.c
===================================================================
RCS file: /raid5/case/cvsroot/amber8/src/leap/src/leap/xaUnitEditor.c,v
retrieving revision 7.10
diff -u -p -r7.10 xaUnitEditor.c
--- src/leap/src/leap/xaUnitEditor.c	5 May 2003 15:40:23 -0000	7.10
+++ src/leap/src/leap/xaUnitEditor.c	16 Mar 2006 23:50:21 -0000
@@ -68,16 +68,21 @@
 
 #include	"basics.h"
 #include        "classes.h"
+#include        "commands.h"
 #include	"varArray.h"
 #include	"minimizer.h"
 #include 	"xTank.h"
-
+#include        "select.h"
+#include        "build.h"
+#include        "model.h"
+#include        "graphUtil.h"
+#include        "leap.h"
 #include	"xaTools.h"
 #include	"xaLeap.h"
 #include	"xaCommand.h"
 #include	"xaUnitEditor.h"
 #include	"xaAtomTable.h"
-
+#include        "../Wc/WcCreate.h"
 extern int		GiUnitEditors;
 
 /*
@@ -297,7 +302,7 @@ XAUECheckUnitEdit( Widget wCur, caddr_t 
 	break;
       }
   }
-  
+  return NULL;
 }
 
 
@@ -465,6 +470,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -496,6 +502,7 @@ XAUEToggleShowPertNames( Widget wCur, ca
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -526,8 +533,9 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
-
+   
 
 
 
@@ -562,6 +570,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -596,6 +605,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -631,6 +641,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -666,6 +677,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -703,6 +715,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -735,6 +748,7 @@ Widget		wTank;
     }
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -775,13 +789,13 @@ int		iDum;
 
     ContainerResetAllAtomsFlags((CONTAINER) uUnit, ATOMNEEDSBUILD );
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
     MESSAGE(( "Building external coordinates for the UNIT\n" ));
 
 	/* Try to build geometries for simple rings */
 
-    BuildInternalsForSimpleRings( uUnit );
+    BuildInternalsForSimpleRings( (CONTAINER)uUnit );
 
 
 	/* Assign internal coordinates for all internals that */
@@ -829,6 +843,7 @@ int		iDum;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -860,7 +875,7 @@ int		iDum;
 
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
     MESSAGE(( "Building external coordinates for the UNIT\n" ));
 
@@ -917,6 +932,7 @@ int		iDum;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -937,6 +953,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
    TankSetState((TANK) wTank, TANKDRAW );
+   return NULL;
 }
 
 
@@ -954,6 +971,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKERASE );
+    return NULL;
 }
 
 
@@ -971,6 +989,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKSELECT );
+    return NULL;
 }
 
 
@@ -988,6 +1007,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKDRAGROTATE );
+    return NULL;
 }
 
 
@@ -1005,6 +1025,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     TankSetState((TANK) wTank, TANKTWIST );
+    return NULL;
 }
 
 
@@ -1072,6 +1093,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1099,7 +1121,7 @@ Widget		wTank;
 
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
 		/* First turn off the ATOMTOUCHED flags for all ATOMs */
 
@@ -1121,7 +1143,8 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
-}
+    return NULL;
+} 
 
 
 /*
@@ -1146,7 +1169,7 @@ Widget		wTank;
     wTank = zwXAUETank( wCur );
 
     uUnit = uTankUnit((TANK)wTank);
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
 
 		/* First turn off the ATOMTOUCHED flags for all ATOMs */
 
@@ -1171,6 +1194,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1200,7 +1224,7 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
     lAtoms = lLoop((OBJEKT) uUnit, ATOMS );
     while ( aAtom = (ATOM)oNext(&lAtoms) ) {
 	if ( bAtomFlagsSet( aAtom, ATOMSELECTED ) ) {
@@ -1210,6 +1234,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1236,7 +1261,7 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
 
-    if ( uUnit == NULL ) return;
+    if ( uUnit == NULL ) return NULL;
     lAtoms = lLoop((OBJEKT) uUnit, ATOMS );
     while ( aAtom = (ATOM)oNext(&lAtoms) ) {
 	if ( !bAtomFlagsSet( aAtom, ATOMSELECTED ) ) {
@@ -1246,6 +1271,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1270,11 +1296,12 @@ Widget		wTank;
 
     uUnit = uTankUnit((TANK)wTank);
     if ( uUnit == NULL ) 
-	return;
+	return NULL;
     ContainerResetAllAtomsFlags((CONTAINER) uUnit, ATOMNOTDISPLAYED );
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1311,6 +1338,7 @@ Widget		wTank;
     TankRedisplayUnit((TANK) wTank );
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1364,6 +1392,7 @@ Widget		wTank;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 /*
@@ -1406,9 +1435,9 @@ XAUESensitiveUnit( Widget wCur, caddr_t 
 	unit->bTableExist = FALSE;
       }
   }
+    return NULL;
 }
 
-
 /*
  *	XAUEEditSelectedAtoms
  *
@@ -1475,6 +1504,7 @@ XAUEEditSelectedAtoms( Widget wCur, cadd
   
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1508,6 +1538,7 @@ ATOM		aAtom;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1541,13 +1572,13 @@ ATOM		aAtom;
     TankRedisplayUnit((TANK)wTank);
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
 
 
 
-
 /*
  *	XAUEPrintAllInternals
  *
@@ -1609,6 +1640,7 @@ STRING		s1, s2, s3, s4;
     }
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1653,6 +1685,7 @@ UNIT		uUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1694,6 +1727,7 @@ UNIT		uUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL; 
 }
 
 
@@ -1734,13 +1768,13 @@ UNIT		uUnit, uOtherUnit, uTempUnit;
 	VP0(( "Import: no unit selected.\n" ));
     	DisplayerReleaseUpdates(); 
     	PopCurrentPrintSink();
-	return;
+	return NULL;
     }
     if ( iObjectType(uOtherUnit) != UNITid ) {
 	VP0(( "Only UNITs can be imported.\n" ));
     	DisplayerReleaseUpdates(); 
     	PopCurrentPrintSink();
-	return;
+	return NULL;
     }
 
 		/* Make a copy of the other UNIT and join it to the first */
@@ -1753,6 +1787,7 @@ UNIT		uUnit, uOtherUnit, uTempUnit;
 
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1774,7 +1809,7 @@ UNIT		uUnit;
 		/* If a MINIMIZER is defined then do not exit */
 
 
-    if ( zmXAUEMinimizer(wCur) != NULL ) return;
+    if ( zmXAUEMinimizer(wCur) != NULL ) return NULL;
 
     MESSAGE(( "Discarding changes\n" ));
 
@@ -1790,6 +1825,7 @@ UNIT		uUnit;
     GiUnitEditors--;
     DisplayerReleaseUpdates(); 
     PopCurrentPrintSink();
+    return NULL;
 }
 
 
@@ -1831,6 +1867,7 @@ XAUETankWidgetRegister( Widget wCur, cad
 
     zXAUESetTank( wCur, wCur );
 
+    return NULL;
 }
 
 
@@ -1861,6 +1898,7 @@ int		iSink;
     if (zwXAUETank(wCur) != (Widget)NULL)
       TankDefinePrintSink((TANK) zwXAUETank(wCur), iSink);
 
+    return NULL;
 }
 
 
@@ -1899,6 +1937,7 @@ XAUERegisterUnitEditor( Widget wShell, c
 	       (GENP)wShell );
   
   GiUnitEditors++;
+  return NULL;
 }
 
 
@@ -2002,6 +2041,5 @@ XAUEInitialize( XtAppContext app )
     WCLREG( "XAUERegisterUnitEditor", XAUERegisterUnitEditor );
 
     WCLREG( "XAUESensitiveUnit",    XAUESensitiveUnit    );
-    WCLREG( "XAUECheckUnitEdit",    XAUECheckUnitEdit    );
-
+    WCLREG( "XAUECheckUnitEdit",    XAUECheckUnitEdit    );       
 }
------------------------------------------------------------------------------

Temporary workarounds: build xleap in 32-bit mode

********>Bugfix 61:
Author: Ray Luo
Date: 05/2/2006
                                                                                
Programs: pbsa
                                                                                
Description: pb_force.f has a statement causing a negative number to be
             taken square root. This is not correct, but many compilers
             allow it.
                                                                                
Fix:  apply the following patch to amber8/src/pbsa/pb_force.f

------------------------------------------------------------------------------
*** src/pbsa/pb_force.f	2005-02-07 16:56:41.000000000 -0800
--- src/pbsa/pb_force.f	2006-05-02 17:04:03.000000000 -0700
***************
*** 2944,2950 ****
           dyij = acrd(2,jatm) - yi
           dzij = acrd(3,jatm) - zi
           d2 = dxij**2 + dyij**2 + dzij**2
!          if ( d2 >= (ri + rj)**2 ) cycle
            
           ! setting up indexes ...
            
--- 2944,2950 ----
           dyij = acrd(2,jatm) - yi
           dzij = acrd(3,jatm) - zi
           d2 = dxij**2 + dyij**2 + dzij**2
!          if ( d2 >= (ri + rj)**2 .or. d2 <= (ri - rj)**2 ) cycle
            
           ! setting up indexes ...
            
------------------------------------------------------------------------------
                                                                                
Temporary workarounds: none

********>Bugfix 62:
Author: Dave Case
Date: 05/10/2006
                                                                                
Programs: ambpdb
                                                                                
Description: The allocation for the ipres() array is too small.  This can
             lead to a segmentation fault under some circumstances.
                                                                                
Fix:  apply the following patch to amber8/src/etc/ambpdb.f

------------------------------------------------------------------------------
*** src/etc/ambpdb.f	2005/01/11 22:42:59	1.17
--- src/etc/ambpdb.f	2006/05/10 15:11:22
***************
*** 85,91 ****
  c
  c      ------ Allocate memory: ------
  c
!       allocate( c(3*natom), igraph(natom), ipres(nres), lbres(nres),
       .          lastat(nres), ib(nbond), jb(nbond), chg(natom),
       .          ftype(natom), fhybrid(natom), fhbdon(natom),fhbh(natom),
       .          fhbacc(natom), fhbene(natom), itf(natom), jtf(natom),
--- 85,91 ----
  c
  c      ------ Allocate memory: ------
  c
!       allocate( c(3*natom), igraph(natom), ipres(nres+1), lbres(nres),
       .          lastat(nres), ib(nbond), jb(nbond), chg(natom),
       .          ftype(natom), fhybrid(natom), fhbdon(natom),fhbh(natom),
       .          fhbacc(natom), fhbene(natom), itf(natom), jtf(natom),
------------------------------------------------------------------------------
                                                                                
Temporary workarounds: none

********>Bugfix 63:
Author: Bob Duke
Date: 08/W01
                                                                                
Programs: pmemd
                                                                                
Description: The iwrap=1 option does not work correctly.
                                                                                
Fix:  apply the following patch to amber8/src/pmemd/src/ew_box.f90

------------------------------------------------------------------------------
*** src/pmemd/src/ew_box.f90	2004-02-04 11:47:55.000000000 -0500
--- src/pmemd/src/ew_box.f90	2006-08-01 15:10:26.000000000 -0400
***************
*** 337,342 ****
--- 337,343 ----
                  crd(3, j) * recip(3, 3)
      end do
  
+ #if 0
      f1 = f1/molsiz(i)
      f2 = f2/molsiz(i)
      f3 = f3/molsiz(i)
***************
*** 352,357 ****
--- 353,367 ----
      g3 = f3
      if (f3 .lt. 0.d0) g3 = f3 + 1.d0
      if (f3 .ge. 1.d0) g3 = f3 - 1.d0
+ #else
+     f1 = f1/molsiz(i) - 0.5d0
+     f2 = f2/molsiz(i) - 0.5d0
+     f3 = f3/molsiz(i) - 0.5d0
+ 
+     g1 = f1 - anint(f1)
+     g2 = f2 - anint(f2)
+     g3 = f3 - anint(f3)
+ #endif
  
      if (f1 .ne. g1 .or. f2 .ne. g2 .or. f3 .ne. g3) then
        tran(1) = (g1 - f1) * ucell(1, 1) + (g2 - f2) * ucell(1, 2) + &
------------------------------------------------------------------------------
                                                                                
Temporary workarounds: none

********>Bugfix 64:
Author: Dave Case, original fix from Ross Walker and Mike Crowley
Date: 05/15/2007
                                                                                
Programs: sander
                                                                                
Description: Reciprocal PME energies are computed incorrectly with ifort 9.x
             compilers (and maybe other versions?) for ia64 machines
                                                                                
Fix:  apply the following patch to amber8/src/sander/ew_fft.f

------------------------------------------------------------------------------
*** src/sander/ew_fft.f	22 Dec 2003 20:22:23 -0000	7.53
--- src/sander/ew_fft.f	15 May 2007 15:01:35 -0000
***************
*** 348,357 ****
--- 348,362 ----
  
     do i=1,n3left-1
        nxyslab(i) = n3all+1
+    end do
+    do i=1,n3left-1
        mxystart(i) = mxystart(i-1) + nxyslab(i-1)
     end do
+ 
     do i=max(n3left,1),numtasks-1
        nxyslab(i) = n3all
+    end do
+    do i=max(n3left,1),numtasks-1
        mxystart(i) = mxystart(i-1) + nxyslab(i-1)
     end do
     mxyslabs = nxyslab(mytaskid)
***************
*** 365,374 ****
--- 370,383 ----
  
     do i=1,n2left-1
        nxzslab(i) = n2all+1
+    end do
+    do i=1,n2left-1
        mxzstart(i) = mxzstart(i-1) + nxzslab(i-1)
     end do
     do i=max(n2left,1),numtasks-1
        nxzslab(i) = n2all
+    end do
+    do i=max(n2left,1),numtasks-1
        mxzstart(i) = mxzstart(i-1) + nxzslab(i-1)
     end do
     mxzslabs = nxzslab(mytaskid)
------------------------------------------------------------------------------
                                                                                
Temporary workarounds: none