31 #define MIN_DEBUG_LEVEL 3
39 #define M_PI 3.14159265358979323846
41 #ifndef CODE_REDUNDANT
42 #define CODE_REDUNDANT 0
81 #ifdef MEM_OPT_VERSION
82 NAMD_die(
"Go forces are not supported in memory-optimized builds.");
84 build_lists_by_atom();
89 iout <<
iINFO <<
"Reading Go File: " << iterator <<
"\n" <<
endi;
93 }
while ( g != NULL && iterator < 100);
125 char first_word[512];
136 int restrictionCount = 0;
166 if ( (pfile = fopen(fname,
"r")) == NULL)
170 sprintf(err_msg,
"UNABLE TO OPEN GO PARAMETER FILE %s\n", fname);
185 (strncmp(first_word,
"!", 1) != 0) &&
186 (strncmp(first_word,
"*", 1) != 0) &&
187 (strncasecmp(first_word,
"END", 3) != 0))
190 iout <<
iWARN <<
"SKIPPING PART OF GO PARAMETER FILE AFTER RETURN STATEMENT\n" <<
endi;
194 if (strncasecmp(first_word,
"chaintypes", 10)==0)
196 read_count=sscanf(buffer,
"%s %d %d\n", first_word, &int1, &int2);
197 if (read_count != 3) {
199 sprintf(err_msg,
"UNKNOWN PARAMETER IN GO PARAMETER FILE %s\nLINE=*%s*\nread_count=%d, int1=%d, int2=%d", fname, buffer, read_count, int1, int2);
204 if (chain1 < 1 || chain1 > MAX_GO_CHAINS ||
205 chain2 < 1 || chain2 > MAX_GO_CHAINS) {
207 sprintf(err_msg,
"GO PARAMETER FILE: CHAIN INDEX MUST BE [1-%d] %s\nLINE=*%s*\nread_count=%d, int1=%d, int2=%d", MAX_GO_CHAINS, fname, buffer, read_count, int1, int2);
218 if (chain1 == chain2) {
230 restrictionCount = 0;
232 else if (strncasecmp(first_word,
"epsilonRep", 10)==0)
234 read_count=sscanf(buffer,
"%s %f\n", first_word, &r1);
235 if (read_count != 2) {}
241 else if (strncasecmp(first_word,
"epsilon", 7)==0)
244 read_count=sscanf(buffer,
"%s %f\n", first_word, &r1);
245 if (read_count != 2) {}
251 else if (strncasecmp(first_word,
"exp_a", 5)==0)
253 read_count=sscanf(buffer,
"%s %d\n", first_word, &int1);
254 if (read_count != 2) {}
255 goValue1->
exp_a = int1;
257 goValue2->
exp_a = int1;
260 else if (strncasecmp(first_word,
"exp_b", 5)==0)
262 read_count=sscanf(buffer,
"%s %d\n", first_word, &int1);
263 if (read_count != 2) {}
264 goValue1->
exp_b = int1;
266 goValue2->
exp_b = int1;
269 else if (strncasecmp(first_word,
"exp_rep", 5)==0)
271 read_count=sscanf(buffer,
"%s %d\n", first_word, &int1);
272 if (read_count != 2) {}
278 else if (strncasecmp(first_word,
"exp_Rep", 5)==0)
280 read_count=sscanf(buffer,
"%s %d\n", first_word, &int1);
281 if (read_count != 2) {}
287 else if (strncasecmp(first_word,
"sigmaRep", 8)==0)
289 read_count=sscanf(buffer,
"%s %f\n", first_word, &r1);
290 if (read_count != 2) {}
296 else if (strncasecmp(first_word,
"cutoff", 6)==0)
298 read_count=sscanf(buffer,
"%s %f\n", first_word, &r1);
299 if (read_count != 2) {}
305 else if (strncasecmp(first_word,
"restriction", 10)==0)
307 read_count=sscanf(buffer,
"%s %d\n", first_word, &int1);
308 if (read_count != 2) {}
310 DebugM(3,
"ERROR: residue restriction value must be nonnegative. int1=" << int1 <<
"\n");
314 DebugM(3,
"ERROR: residue restrictions should not be defined between two separate chains. chain1=" << chain1 <<
", chain2=" << chain2 <<
"\n");
321 else if (strncasecmp(first_word,
"return", 4)==0)
332 sprintf(err_msg,
"UNKNOWN PARAMETER IN GO PARAMETER FILE %s\nLINE=*%s*",fname, buffer);
555 <<
"*****************************************" << std::endl);
565 DebugM(3,
"Go index=(" << i <<
"," << j <<
") epsilon=" <<
go_array[index].epsilon \
566 <<
" exp_a=" <<
go_array[index].exp_a <<
" exp_b=" <<
go_array[index].exp_b \
567 <<
" exp_rep=" <<
go_array[index].exp_rep <<
" sigmaRep=" \
568 <<
go_array[index].sigmaRep <<
" epsilonRep=" <<
go_array[index].epsilonRep \
569 <<
" cutoff=" <<
go_array[index].cutoff << std::endl);
576 #ifndef MEM_OPT_VERSION
580 DebugM(3,
"->build_go_sigmas" << std::endl);
597 BigReal nonnativeEnergy, *nonnative;
600 native = &nativeEnergy;
601 nonnative = &nonnativeEnergy;
603 long nativeContacts = 0;
604 long nonnativeContacts = 0;
609 if (goCoordFile == NULL)
612 NAMD_die(
"Error: goCoordFile is NULL - build_go_sigmas");
616 if (goCoordFile->
next != NULL)
618 NAMD_die(
"Multiple definitions of Go atoms PDB file in configuration file");
621 if ( (cwd == NULL) || (goCoordFile->
data[0] ==
'/') )
623 strcpy(filename, goCoordFile->
data);
627 strcpy(filename, cwd);
628 strcat(filename, goCoordFile->
data);
631 goPDB =
new PDB(filename);
634 NAMD_die(
"Memory allocation failed in Molecule::build_go_sigmas");
639 NAMD_die(
"Number of atoms in fixed atoms PDB doesn't match coordinate PDB");
648 NAMD_die(
"memory allocation failed in Molecule::build_go_sigmas");
656 chainType = (
int32)(goPDB->
atom(i))->occupancy();
658 if ( chainType != 0 ) {
681 DebugM(3,
" numAtoms=" << numAtoms << std::endl);
684 resid1 = (goPDB->
atom(i))->residueseq();
691 resid2 = (goPDB->
atom(j))->residueseq();
700 residDiff = resid2 - resid1;
702 if (residDiff < 0) residDiff = -residDiff;
710 atomAtomDist = sqrt(pow((goPDB->
atom(i))->xcoor() - (goPDB->
atom(j))->xcoor(), 2.0) +
711 pow((goPDB->
atom(i))->ycoor() - (goPDB->
atom(j))->ycoor(), 2.0) +
712 pow((goPDB->
atom(i))->zcoor() - (goPDB->
atom(j))->zcoor(), 2.0));
716 sigma = pow(static_cast<double>(exp_b/exp_a),(1.0/(exp_a-exp_b))) * atomAtomDist;
718 goSigmas[goSigmaIndices[j]*numGoAtoms + goSigmaIndices[i]] = sigma;
719 goWithinCutoff[goSigmaIndices[i]*numGoAtoms + goSigmaIndices[j]] =
true;
720 goWithinCutoff[goSigmaIndices[j]*numGoAtoms + goSigmaIndices[i]] =
true;
724 goSigmas[goSigmaIndices[j]*numGoAtoms + goSigmaIndices[i]] = 0.0;
729 goSigmas[goSigmaIndices[j]*numGoAtoms + goSigmaIndices[i]] = -1.0;
735 iout <<
iINFO <<
"Number of UNIQUE native contacts: " << nativeContacts <<
"\n" <<
endi;
736 iout <<
iINFO <<
"Number of UNIQUE nonnative contacts: " << nonnativeContacts <<
"\n" <<
endi;
739 if (goCoordFile != NULL) {
750 DebugM(3,
"->build_go_sigmas2" << std::endl);
768 long nativeContacts = 0;
769 long nonnativeContacts = 0;
774 if (goCoordFile == NULL)
777 NAMD_die(
"Error: goCoordFile is NULL - build_go_sigmas2");
781 if (goCoordFile->
next != NULL)
783 NAMD_die(
"Multiple definitions of Go atoms PDB file in configuration file");
786 if ( (cwd == NULL) || (goCoordFile->
data[0] ==
'/') )
788 strcpy(filename, goCoordFile->
data);
792 strcpy(filename, cwd);
793 strcat(filename, goCoordFile->
data);
796 goPDB =
new PDB(filename);
799 NAMD_die(
"Memory allocation failed in Molecule::build_go_sigmas2");
804 NAMD_die(
"Number of atoms in fixed atoms PDB doesn't match coordinate PDB");
815 NAMD_die(
"memory allocation failed in Molecule::build_go_sigmas2");
823 chainType = (
int32)(goPDB->
atom(i))->occupancy();
825 residType = (
int32)(goPDB->
atom(i))->residueseq();
827 if ( chainType != 0 ) {
846 DebugM(3,
" numAtoms=" << numAtoms << std::endl);
848 resid1 = (goPDB->
atom(i))->residueseq();
850 resid2 = (goPDB->
atom(j))->residueseq();
852 residDiff = resid2 - resid1;
853 if (residDiff < 0) residDiff = -residDiff;
856 atomAtomDist = sqrt(pow((goPDB->
atom(i))->xcoor() - (goPDB->
atom(j))->xcoor(), 2.0) +
857 pow((goPDB->
atom(i))->ycoor() - (goPDB->
atom(j))->ycoor(), 2.0) +
858 pow((goPDB->
atom(i))->zcoor() - (goPDB->
atom(j))->zcoor(), 2.0));
862 sigma = pow(static_cast<double>(exp_b/exp_a),(1.0/(exp_a-exp_b))) * atomAtomDist;
863 double tmpA = pow(sigma,exp_a);
864 double tmpB = pow(sigma,exp_b);
886 iout <<
iINFO <<
"Number of UNIQUE native contacts: " << nativeContacts <<
"\n" <<
endi;
887 iout <<
iINFO <<
"Number of UNIQUE nonnative contacts: " << nonnativeContacts <<
"\n" <<
endi;
913 oldIndex = goIndxLJA[i];
919 if (goCoordFile != NULL) {
927 bool Molecule::goPairCompare(
GoPair first,
GoPair second) {
953 DebugM(3,
"->build_go_arrays" << std::endl);
969 BigReal nonnativeEnergy, *nonnative;
972 native = &nativeEnergy;
973 nonnative = &nonnativeEnergy;
975 long nativeContacts = 0;
976 long nonnativeContacts = 0;
981 if (goCoordFile == NULL)
984 NAMD_die(
"Error: goCoordFile is NULL - build_go_arrays");
988 if (goCoordFile->
next != NULL)
990 NAMD_die(
"Multiple definitions of Go atoms PDB file in configuration file");
993 if ( (cwd == NULL) || (goCoordFile->
data[0] ==
'/') )
995 strcpy(filename, goCoordFile->
data);
999 strcpy(filename, cwd);
1000 strcat(filename, goCoordFile->
data);
1004 if (
goPDB == NULL )
1006 NAMD_die(
"goPDB memory allocation failed in Molecule::build_go_arrays");
1011 NAMD_die(
"Number of atoms in fixed atoms PDB doesn't match coordinate PDB");
1019 NAMD_die(
"goSigmaIndices memory allocation failed in Molecule::build_go_arrays");
1027 if ( chainType != 0 ) {
1028 DebugM(3,
"build_go_arrays - atom:" << i << std::endl);
1053 NAMD_die(
"atomChainTypes memory allocation failed in Molecule::build_go_arrays");
1060 NAMD_die(
"goCoordinates memory allocation failed in Molecule::build_go_arrays");
1067 NAMD_die(
"goResids memory allocation failed in Molecule::build_go_arrays");
1072 if (goIndex != -1) {
1086 for (i=0; i<numAtoms-1; i++) {
1088 if (goIndex != -1) {
1092 resid1 = (
goPDB->
atom(i))->residueseq();
1093 resid2 = (
goPDB->
atom(j))->residueseq();
1094 residDiff = resid2 - resid1;
1095 if (residDiff < 0) residDiff = -residDiff;
1099 atomAtomDist = sqrt(pow((
goPDB->
atom(i))->xcoor() - (
goPDB->
atom(j))->xcoor(), 2.0) +
1105 nonnativeContacts++;
1112 iout <<
iINFO <<
"Number of UNIQUE native contacts: " << nativeContacts <<
"\n" <<
endi;
1113 iout <<
iINFO <<
"Number of UNIQUE nonnative contacts: " << nonnativeContacts <<
"\n" <<
endi;
1116 if (goCoordFile != NULL) {
1123 #endif // #ifndef MEM_OPT_VERSION
1140 DebugM(3,
"GO SIGMA ARRAY\n" \
1141 <<
"***************************" << std::endl);
1145 DebugM(3,
"GO SIGMAS HAVE NOT BEEN BUILT" << std::endl);
1155 DebugM(3,
"(" << i <<
"," << j <<
") - +" << sigma <<
" ");
1158 DebugM(3,
"(" << i <<
"," << j <<
") - " << sigma <<
" ");
1165 DebugM(3,
"-----------" << std::endl);
1179 BigReal* pairGaussEnergy)
const
1182 *pairLJEnergy = 0.0;
1183 *pairGaussEnergy = 0.0;
1189 for(
int i = LJbegin; i <= LJend; i++) {
1197 int GaussIndex = -1;
1200 for(
int i = Gaussbegin; i <= Gaussend; i++) {
1207 if( LJIndex == -1 && GaussIndex == -1) {
1214 BigReal ri6 = (ri*ri*ri*ri*ri*ri);
1220 if (LJIndex != -1) {
1222 LJ = (12*(
pairC12[LJIndex]*ri13) - 6*(
pairC6[LJIndex]*ri7));
1223 *pairLJEnergy = (
pairC12[LJIndex]*ri12 -
pairC6[LJIndex]*ri6);
1227 if (GaussIndex != -1) {
1230 BigReal tmp1 = r1prime * r1prime;
1232 BigReal tmp2 = r2prime * r2prime;
1238 tmp_gauss1 = exp(-tmp1*
giSigma1[GaussIndex]);
1239 one_gauss1 = 1 - tmp_gauss1;
1242 tmp_gauss2 = exp(-tmp2*
giSigma2[GaussIndex]);
1243 one_gauss2 = 1 - tmp_gauss2;
1246 Gauss = gr*one_gauss1*one_gauss2 - 2*A*tmp_gauss1*one_gauss2*r1prime*
giSigma1[GaussIndex] \
1247 - 2*tmp_gauss1*one_gauss2*r1prime*
giSigma1[GaussIndex]*
gRepulsive[GaussIndex]*ri12 - 2*A*tmp_gauss2*one_gauss1*r2prime*
giSigma2[GaussIndex] \
1249 *pairGaussEnergy = A*(-1+(one_gauss1)*(one_gauss2)*(1+
gRepulsive[GaussIndex]*ri12/
A));
1252 return (LJ + Gauss)*ri;
1275 if (chain1 == 0 || chain2 == 0)
return 0.0;
1281 if (goCutoff == 0)
return 0.0;
1289 pow1 = pow(sigmaRep/r,exp_rep);
1290 goForce = 4*((exp_rep/(r*r)) * epsilonRep * pow1);
1292 *goNonnative = (4 * epsilonRep * pow1 );
1299 if (goSigmaIndex1 != -1 && goSigmaIndex2 != -1) {
1305 pow1 = pow(sigma_ij/r,exp_a);
1306 pow2 = pow(sigma_ij/r,exp_b);
1307 goForce = ((4/(r*r)) * epsilon * (exp_a * pow1 - exp_b * pow2));
1309 *goNative = (4 * epsilon * ( pow1 - pow2 ) );
1362 DebugM(3,
"get_go_force - (" << atom1 <<
"," << atom2 <<
")" << std::endl);
1369 DebugM(3,
" chain1:" << chain1 <<
", chain2:" << chain2 << std::endl);
1370 if (chain1 == 0 || chain2 == 0)
return 0.0;
1374 DebugM(3,
" goCutoff:" << goCutoff << std::endl);
1375 if (goCutoff == 0)
return 0.0;
1386 if ( goIndex1 != -1 && goIndex2 != -1 ) {
1389 residDiff = resid2 - resid1;
1390 if (residDiff < 0) residDiff = -residDiff;
1392 if ( !(const_cast<Molecule*>(
this)->
go_restricted(chain1,chain2,residDiff)) ) {
1394 ycoorDiff = goCoordinates[goIndex1*3 + 1] - goCoordinates[goIndex2*3 + 1];
1395 zcoorDiff = goCoordinates[goIndex1*3 + 2] - goCoordinates[goIndex2*3 + 2];
1396 atomAtomDist = sqrt(xcoorDiff*xcoorDiff + ycoorDiff*ycoorDiff + zcoorDiff*zcoorDiff);
1399 if ( atomAtomDist <= const_cast<Molecule*>(
this)->
get_go_cutoff(chain1,chain2) ) {
1402 sigma_ij = pow(static_cast<double>(exp_b/exp_a),(1.0/(exp_a-exp_b))) * atomAtomDist;
1408 pow1 = pow(sigma_ij/r,static_cast<double>(exp_a));
1409 pow2 = pow(sigma_ij/r,static_cast<double>(exp_b));
1411 goForce = ((4/(r*r)) * epsilon * (exp_a * pow1 - exp_b * pow2));
1412 DebugM(3,
"get_go_force - (" << atom1 <<
"," << atom2 <<
") chain1:" << chain1 <<
", chain2:" << chain2 <<
", exp_a:" << exp_a <<
", exp_b:" << exp_b <<
", sigma_ij:" << sigma_ij <<
", r:" << r <<
", goForce:" << goForce << std::endl);
1414 *goNative = (4 * epsilon * ( pow1 - pow2 ) );
1423 pow1 = pow(sigmaRep/r,(
BigReal)expRep);
1425 goForce = ((4/(r*r)) * expRep * epsilonRep * pow1);
1426 DebugM(3,
"get_go_force - (" << atom1 <<
"," << atom2 <<
") chain1:" << chain1 <<
", chain2:" << chain2 <<
", epsilonRep:" << epsilonRep <<
", sigmaRep:" << sigmaRep <<
", r:" << r <<
", goForce:" << goForce << std::endl);
1428 *goNonnative = (4 * epsilonRep * pow1);
1469 if(chain1 == 0 || chain2 == 0)
return 0.0;
1472 if(goCutoff == 0)
return 0.0;
1476 int residDiff = abs(resid1 - resid2);
1484 for(
int i = LJbegin; i <= LJend; i++) {
1493 if (LJIndex == -1) {
1497 double sigmaRepPow = pow(sigmaRep,exp_rep);
1498 BigReal LJ = (4*epsilonRep*exp_rep*sigmaRepPow*pow(r,-(exp_rep+1)));
1500 *goNonnative = (4*epsilonRep*sigmaRepPow*pow(r,-exp_rep));
1508 BigReal powA = pow(r,-(exp_a + 1));
1509 BigReal powB = pow(r,-(exp_b + 1));
1510 BigReal powaa = pow(r,-exp_a);
1511 BigReal powbb = pow(r,-exp_b);
1523 #ifndef MEM_OPT_VERSION
1550 DebugM(2,
"atoms_1to4(" << atom1 <<
"," << atom2 <<
")" << std::endl);
1554 while(bondNum != -1) {
1556 DebugM(2,
"bond atom1:" << bond->
atom1 <<
", atom2:" << bond->
atom2 << std::endl);
1557 if (atom2 == bond->
atom1 || atom2 == bond->
atom2) {
1560 bondNum = *(++bonds);
1565 while(bondNum != -1) {
1567 DebugM(2,
"bond atom1:" << bond->
atom1 <<
", atom2:" << bond->
atom2 << std::endl);
1568 if (atom1 == bond->
atom1 || atom1 == bond->
atom2) {
1571 bondNum = *(++bonds);
1576 while(angleNum != -1) {
1578 DebugM(2,
"angle atom1:" << angle->
atom1 <<
", atom2:" << angle->
atom2 <<
", atom3:" << angle->
atom3 << std::endl);
1579 if (atom2 == angle->
atom1 || atom2 == angle->
atom2 || atom2 == angle->
atom3) {
1582 angleNum = *(++angles);
1587 while(angleNum != -1) {
1589 DebugM(2,
"angle atom1:" << angle->
atom1 <<
", atom2:" << angle->
atom2 <<
", atom3:" << angle->
atom3 << std::endl);
1590 if (atom1 == angle->
atom1 || atom1 == angle->
atom2 || atom1 == angle->
atom3) {
1593 angleNum = *(++angles);
1597 dihedralNum = *dihedrals;
1598 while(dihedralNum != -1) {
1600 DebugM(2,
"dihedral atom1:" << dihedral->
atom1 <<
", atom2:" << dihedral->
atom2 <<
", atom3:" << dihedral->
atom3 <<
", atom4:" << dihedral->
atom4 << std::endl);
1601 if (atom2 == dihedral->
atom1 || atom2 == dihedral->
atom2 \
1602 || atom2 == dihedral->
atom3 || atom2 == dihedral->
atom4) {
1605 dihedralNum = *(++dihedrals);
1609 dihedralNum = *dihedrals;
1610 while(dihedralNum != -1) {
1612 DebugM(2,
"dihedral atom1:" << dihedral->
atom1 <<
", atom2:" << dihedral->
atom2 <<
", atom3:" << dihedral->
atom3 <<
", atom4:" << dihedral->
atom4 << std::endl);
1613 if (atom1 == dihedral->
atom1 || atom1 == dihedral->
atom2 \
1614 || atom1 == dihedral->
atom3 || atom1 == dihedral->
atom4) {
1617 dihedralNum = *(++dihedrals);
1623 #endif // #ifndef MEM_OPT_VERSION
1636 Real *a1, *a2, *a3, *a4;
1637 int *i1, *i2, *i3, *i4;
1646 a1 =
new Real[maxGoChainsSqr];
1647 a2 =
new Real[maxGoChainsSqr];
1648 a3 =
new Real[maxGoChainsSqr];
1649 a4 =
new Real[maxGoChainsSqr];
1650 i1 =
new int[maxGoChainsSqr];
1651 i2 =
new int[maxGoChainsSqr];
1652 i3 =
new int[maxGoChainsSqr];
1655 if ( (a1 == NULL) || (a2 == NULL) || (a3 == NULL) || (a4 == NULL) ||
1656 (i1 == NULL) || (i2 == NULL) || (i3 == NULL) || (i4 == NULL) )
1658 NAMD_die(
"memory allocation failed in Molecules::send_Molecules");
1661 for (
int i=0; i<maxGoChainsSqr; i++) {
1674 msg->
put(maxGoChainsSqr, a1);
1675 msg->
put(maxGoChainsSqr, a2);
1676 msg->
put(maxGoChainsSqr, a3);
1677 msg->
put(maxGoChainsSqr, a4);
1678 msg->
put(maxGoChainsSqr, i1);
1679 msg->
put(maxGoChainsSqr, i2);
1680 msg->
put(maxGoChainsSqr, i3);
1705 msg->
put(numGoAtoms);
1718 msg->
put(numGoAtoms);
1747 Real *a1, *a2, *a3, *a4;
1748 int *i1, *i2, *i3, *i4;
1760 a1 =
new Real[maxGoChainsSqr];
1761 a2 =
new Real[maxGoChainsSqr];
1762 a3 =
new Real[maxGoChainsSqr];
1763 a4 =
new Real[maxGoChainsSqr];
1764 i1 =
new int[maxGoChainsSqr];
1765 i2 =
new int[maxGoChainsSqr];
1766 i3 =
new int[maxGoChainsSqr];
1769 if ( (a1 == NULL) || (a2 == NULL) || (a3 == NULL) || (a4 == NULL) ||
1770 (i1 == NULL) || (i2 == NULL) || (i3 == NULL) || (i4 == NULL) )
1772 NAMD_die(
"memory allocation failed in Molecule::send_Molecule");
1775 msg->
get(maxGoChainsSqr, a1);
1776 msg->
get(maxGoChainsSqr, a2);
1777 msg->
get(maxGoChainsSqr, a3);
1778 msg->
get(maxGoChainsSqr, a4);
1779 msg->
get(maxGoChainsSqr, i1);
1780 msg->
get(maxGoChainsSqr, i2);
1781 msg->
get(maxGoChainsSqr, i3);
1784 for (
int i=0; i<maxGoChainsSqr; i++) {
1841 msg->
get(numGoAtoms);
1872 msg->
get(numGoAtoms);
int get_go_exp_a(int chain1, int chain2)
std::ostream & iINFO(std::ostream &s)
Real get_go_cutoff(int chain1, int chain2)
int32 * get_dihedrals_for_atom(int anum)
int NAMD_read_line(FILE *fd, char *buf, int bufsize)
void send_GoMolecule(MOStream *)
BigReal get_go_force_new(BigReal, int, int, BigReal *, BigReal *) const
BigReal get_gro_force2(BigReal, BigReal, BigReal, int, int, BigReal *, BigReal *) const
void receive_GoMolecule(MIStream *)
Real get_go_epsilonRep(int chain1, int chain2)
std::ostream & endi(std::ostream &s)
std::ostream & iWARN(std::ostream &s)
MIStream * get(char &data)
void NAMD_find_first_word(char *source, char *word)
#define NAMD_FILENAME_BUFFER_SIZE
void read_go_file(char *)
void build_go_arrays(StringList *, char *)
int32 * get_angles_for_atom(int anum)
Real get_go_epsilon(int chain1, int chain2)
Real get_go_sigmaRep(int chain1, int chain2)
BigReal get_go_force(BigReal, int, int, BigReal *, BigReal *) const
Dihedral * get_dihedral(int dnum) const
PDBAtom * atom(int place)
int NAMD_blank_string(char *str)
int get_go_exp_rep(int chain1, int chain2)
GoValue go_array[MAX_GO_CHAINS *MAX_GO_CHAINS]
int32 * get_bonds_for_atom(int anum)
Bool go_restricted(int, int, int)
Bond * get_bond(int bnum) const
void NAMD_die(const char *err_msg)
int add(const Elem &elem)
BlockRadixSort::TempStorage sort
int get_go_exp_b(int chain1, int chain2)
BigReal get_go_force2(BigReal, BigReal, BigReal, int, int, BigReal *, BigReal *) const
int go_indices[MAX_GO_CHAINS+1]
void build_go_sigmas(StringList *, char *)
MOStream * put(char data)
int restrictions[MAX_RESTRICTIONS]
Bool atoms_1to4(unsigned int, unsigned int)
Angle * get_angle(int anum) const
void build_go_params(StringList *)
void build_go_sigmas2(StringList *, char *)