12 #define JOULES_PER_CALORIE 4.184 13 #define ANGSTROMS_PER_NM 10 33 #define MOLECULETYPE 2 42 #define DIHEDRALTYPES 11 47 #ifndef CODE_REDUNDANT 48 #define CODE_REDUNDANT 0 51 #define MIN_DEBUG_LEVEL 3 66 fudgeLJ = fudgeQQ = 1.0;
68 FILE *f = fopen(filename,
"r");
73 sprintf(buf,
"Error opening file '%s'",filename);
89 int num, resnum, chargegp, typenum;
92 float charge, mass, c6, c12, junkf;
103 int atomi, atomj, atomk, atoml;
106 const char *tmptypea,*tmptypeb,*tmptypec,*tmptyped;
118 if(sscanf(buf,
" %c",&testchar)==1) {
119 if(testchar ==
';')
continue;
126 if(sscanf(buf,
" [ %19[^] ] ]",modename)==1) {
128 if(0==strcmp(modename,
"atoms")) mode =
ATOMS;
129 else if(0==strcmp(modename,
"atomtypes")) mode =
ATOMTYPES;
130 else if(0==strcmp(modename,
"moleculetype")) mode =
MOLECULETYPE;
131 else if(0==strcmp(modename,
"molecules")) mode =
MOLECULES;
132 else if(0==strcmp(modename,
"system")) mode =
SYSTEM;
133 else if(0==strcmp(modename,
"bonds")) mode =
BONDS;
134 else if(0==strcmp(modename,
"bondtypes")) mode =
BONDTYPES;
135 else if(0==strcmp(modename,
"angles")) mode =
ANGLES;
136 else if(0==strcmp(modename,
"angletypes")) mode =
ANGLETYPES;
137 else if(0==strcmp(modename,
"dihedrals")) mode =
DIHEDRALS;
138 else if(0==strcmp(modename,
"dihedraltypes")) mode =
DIHEDRALTYPES;
139 else if(0==strcmp(modename,
"defaults")) mode =
DEFAULTS;
140 else if(0==strcmp(modename,
"nonbond_params")) mode =
NONBOND;
142 else if(0==strcmp(modename,
"pairs")) mode =
PAIRS;
143 else if(0==strcmp(modename,
"exclusions")) mode =
EXCLUSIONS;
145 fprintf(stderr,
"Warning: unknown mode %s\n",modename);
155 systemName = strdup(buf);
159 i = sscanf(buf,
" %d %d %20s %f %f",
160 &nbfunc,&combrule,genpairs,&fudgeLJ,&fudgeQQ);
162 fprintf(stderr,
"syntax error in DEFAULTS\n");
166 fprintf(stderr,
"Non-bonded function != 1 unsupported in DEFAULTS\n");
170 fprintf(stderr,
"Combination rule != 1 unsupported in DEFAULTS\n");
173 if(0==strcmp(genpairs,
"yes")) {
176 fprintf(stderr,
"syntax error in DEFAULTS\n");
186 if(5 != sscanf(buf,
" %5s %5s %d %f %f",
187 typea, typeb, &funct, &c6, &c12)) {
188 fprintf(stderr,
"Syntax error in NONBOND\n");
194 vdwTable.
addType(typea,typeb,c6,c12);
198 i = sscanf(buf,
" %d %d %d %f %f",
199 &atomi,&atomj,&funct,&c0,&c1);
203 tmptypea = genericMols[genericMols.
size()-1]->getAtom(atomi)->getType();
204 tmptypeb = genericMols[genericMols.
size()-1]->getAtom(atomj)->getType();
206 index = bondTable.
getParams(tmptypea, tmptypeb, funct, &b0, &kB);
208 fprintf(stderr,
"Required bondtype %s--%s (function %d) not found.\n",
209 tmptypea,tmptypeb,funct);
226 fprintf(stderr,
"I don't know what funct=%d means in BONDS\n",funct);
230 index = bondTable.
getIndex(b0,kB,funct);
233 fprintf(stderr,
"Syntax error in BONDS\n");
237 genericMols[genericMols.
size()-1]->addBond(atomi,atomj,index);
241 if(5 != sscanf(buf,
" %5s %5s %d %f %f",
242 typea,typeb,&funct,&c0,&c1)) {
243 fprintf(stderr,
"Syntax error in BONDTYPES\n");
259 fprintf(stderr,
"I don't know what funct=%d means in BONDTYPES\n",funct);
263 bondTable.
addType(typea,typeb,b0,kB,funct);
267 i = sscanf(buf,
" %d %d %d %d %f %f",
268 &atomi,&atomj,&atomk,&funct,&c0,&c1);
273 tmptypea = genericMols[genericMols.
size()-1]->getAtom(atomi)->getType();
274 tmptypeb = genericMols[genericMols.
size()-1]->getAtom(atomj)->getType();
275 tmptypec = genericMols[genericMols.
size()-1]->getAtom(atomk)->getType();
277 index = angleTable.
getParams(tmptypea, tmptypeb, tmptypec,
281 "Required angletype %s--%s--%s (function %d) not found.\n",
282 tmptypea,tmptypeb,tmptypec,funct);
292 else if(funct == 2) {
298 fprintf(stderr,
"I don't know what funct=%d means in ANGLES\n",funct);
302 index = angleTable.
getIndex(th0,kth,funct);
305 fprintf(stderr,
"Syntax error (%d args) in ANGLES: %s\n",i,buf);
310 genericMols[genericMols.
size()-1]->addAngle(atomi,atomj,atomk,index);
314 if(6 != sscanf(buf,
" %5s %5s %5s %d %f %f",
315 typea,typeb,typec,&funct,&c0,&c1)) {
316 fprintf(stderr,
"Syntax error in ANGLETYPES\n");
324 else if(funct == 2) {
330 fprintf(stderr,
"I don't know what funct=%d means in ANGLETYPES\n",
334 angleTable.
addType(typea,typeb,typec,th0,kth,funct);
338 i = sscanf(buf,
" %d %d %d %d %d %f %f %f %f %f %f",
339 &atomi,&atomj,&atomk,&atoml,&funct,
340 &c[0],&c[1],&c[2],&c[3],&c[4],&c[5]);
346 tmptypea = genericMols[genericMols.
size()-1]->getAtom(atomi)->getType();
347 tmptypeb = genericMols[genericMols.
size()-1]->getAtom(atomj)->getType();
348 tmptypec = genericMols[genericMols.
size()-1]->getAtom(atomk)->getType();
349 tmptyped = genericMols[genericMols.
size()-1]->getAtom(atoml)->getType();
351 index = dihedralTable.
getParams(tmptypea, tmptypeb, tmptypec,
352 tmptyped, funct, c, &mult);
355 "Required dihedraltype %s--%s--%s--%s (function %d) not found.\n",
356 tmptypea,tmptypeb,tmptypec,tmptyped,funct);
360 else if(i==7 || i==8 || i==11) {
361 if(funct==1 || funct==2) {
362 if(i!=7+(funct==1)) {
363 fprintf(stderr,
"Must have 7 args for funct=1,2\n");
369 }
else if (i==8 || i==11) {
375 mult=(int)(c[2]+0.5);
380 fprintf(stderr,
"Must have 11 args for funct=3\n");
390 "I don't know what funct=%d means in DIHEDRALS\n",funct);
393 index = dihedralTable.
getIndex(c,mult,funct);
396 fprintf(stderr,
"Syntax error (%d args) in DIHEDRALS: %s\n",i,buf);
401 genericMols[genericMols.
size()-1]->addDihedral(atomi,atomj,atomk,atoml,
405 i = sscanf(buf,
" %5s %5s %d %f %f %f %f %f %f",
406 typea,typeb,&funct,&c[0],&c[1],&c[2],&c[3],&c[4],&c[5]);
407 if(funct == 1 || funct == 2) {
408 if(i!=5+(funct==1)) {
409 fprintf(stderr,
"Syntax error in DIHEDRALTYPES: %s\n",buf);
416 mult=(int)(c[2]+0.5);
419 else if(funct == 3) {
421 fprintf(stderr,
"Syntax error in DIHEDRALTYPES\n");
429 fprintf(stderr,
"I don't know what funct=%d means in DIHEDRALTYPES\n",
433 dihedralTable.
addType(typea,typeb,c,mult,funct);
437 i = sscanf(buf,
" %d %5s %d %5s %5s %d %f %f",
438 &num, type, &resnum, restype,
439 atomname, &chargegp, &charge, &mass);
442 typenum = atomTable.
getParams(type,&mass,&junkf,&junkf,&junkf);
447 fprintf(stderr,
"Syntax error in ATOMS\n");
451 typenum = atomTable.
getParams(type,&junkf,&junkf,&junkf,&junkf);
453 genericMols[genericMols.
size()-1]->addAtom(type,typenum,resnum,
454 restype,atomname,charge,mass);
458 if(6 != sscanf(buf,
" %5s %f %f %5s %f %f",type,&mass,&charge,
459 particletype,&c6,&c12)) {
460 fprintf(stderr,
"Syntax error in ATOMTYPES: %s\n",buf);
466 atomTable.
addType(type,mass,charge,
472 if(2!=sscanf(buf,
" %20s %d",molname,&nrexcl)) {
473 fprintf(stderr,
"Syntax error in MOLECULETYPE: %s\n",buf);
482 if(2!=sscanf(buf,
" %20s %d",molname,&copies)) {
483 fprintf(stderr,
"Syntax error in MOLECULES: %s\n",buf);
488 moleculeinstance = NULL;
489 for(i=0;i<genericMols.
size();i++) {
490 if(0==strcmp(molname,genericMols[i]->getName())) {
491 moleculeinstance =
new MolInst(genericMols[i],copies);
496 if(moleculeinstance==NULL) {
497 fprintf(stderr,
"Molecule %s undefined.\n",molname);
502 molInsts.
add(moleculeinstance);
517 countVariables = sscanf(buf,
" %d %d %d %f %f %f %f %f %f",&indexA,&indexB,&pairFunction,&fA,&fB,&fC,&fD,&fE,&fF);
519 if ((countVariables >= 4 && countVariables >= 10)) {
520 fprintf(stderr,
"Syntax error in PAIRS: %s\n",buf);
535 if (pairFunction == 1) {
541 }
else if (pairFunction == 5){
548 sprintf(buff,
"GromacsTopFile.C::Attempting to load zero into gaussSigma. Please check the pair: %s\n",buf);
552 iout <<
iWARN <<
"Attempting to load a negative standard deviation into the gaussSigma. Taking the absolute value of the standard deviation.";
556 fC = 1.0/(2 * fC * fC);
558 }
else if (pairFunction == 6) {
565 sprintf(buff,
"GromacsTopFile.C::Attempting to load zero into gaussSigma. Please check the pair: %s\n",buf);
569 iout <<
iWARN <<
"Attempting to load a negative standard deviation into the gaussSigma. Taking the absolute value of the standard deviation.";
573 fC = 1.0/(2 * fC * fC);
576 }
else if (pairFunction == 7) {
581 if(fC == 0 || fE == 0) {
583 sprintf(buff,
"GromacsTopFile.C::Attempting to load zero into gaussSigma. Please check the pair: %s\n",buf);
587 iout <<
iWARN <<
"Attempting to load a negative standard deviation into the gaussSigma. Taking the absolute value of the standard deviation.";
591 fC = 1.0/(2 * fC * fC);
594 fE = 1.0/(2 * fE * fE);
600 fprintf(stderr,
"Unknown pairFunction in GromacsTopFile.C under the PAIRS section: %d\n",pairFunction);
605 if(2 != sscanf(buf,
" %d %d ",&atomi,&atomj)) {
606 fprintf(stderr,
"Syntax error in EXCLUSIONS: %s\n",buf);
631 for(i=0;i<molInsts.
size();i++) {
632 n += molInsts[i]->getNum() *
633 molInsts[i]->getMol()->getNumBonds();
641 for(i=0;i<molInsts.
size();i++) {
642 n += molInsts[i]->getNum() *
643 molInsts[i]->getMol()->getNumAngles();
651 for(i=0;i<molInsts.
size();i++) {
652 n += molInsts[i]->getNum() *
653 molInsts[i]->getMol()->getNumDihedrals();
698 for(i=0;i<molInsts.
size();i++) {
699 int molbonds = molInsts[i]->getMol()->getNumBonds();
700 int molatoms = molInsts[i]->getMol()->getNumAtoms();
701 int newbonds = molInsts[i]->getNumBonds();
702 int newatoms = molInsts[i]->getNumAtoms();
704 if(nbonds+newbonds-1 >= n) {
706 int localnum = (n-nbonds) % molbonds;
707 int instnum = (n-nbonds) / molbonds;
708 int addatoms = natoms+instnum*molatoms;
710 const GenericBond *b = molInsts[i]->getMol()->getBond(localnum);
728 int *angletype)
const {
733 for(i=0;i<molInsts.
size();i++) {
734 int molangles = molInsts[i]->getMol()->getNumAngles();
735 int molatoms = molInsts[i]->getMol()->getNumAtoms();
736 int newangles = molInsts[i]->getNumAngles();
737 int newatoms = molInsts[i]->getNumAtoms();
739 if(nangles+newangles-1 >= n) {
741 int localnum = (n-nangles) % molangles;
742 int instnum = (n-nangles) / molangles;
743 int addatoms = natoms+instnum*molatoms;
745 const GenericAngle *a = molInsts[i]->getMol()->getAngle(localnum);
754 nangles += newangles;
763 int *atoml,
int *type)
const {
768 for(i=0;i<molInsts.
size();i++) {
769 int moldihedrals = molInsts[i]->getMol()->getNumDihedrals();
770 int molatoms = molInsts[i]->getMol()->getNumAtoms();
771 int newdihedrals = molInsts[i]->getNumDihedrals();
772 int newatoms = molInsts[i]->getNumAtoms();
774 if(ndihedrals+newdihedrals-1 >= n) {
776 int localnum = (n-ndihedrals) % moldihedrals;
777 int instnum = (n-ndihedrals) / moldihedrals;
778 int addatoms = natoms+instnum*molatoms;
780 const GenericDihedral *a = molInsts[i]->getMol()->getDihedral(localnum);
790 ndihedrals += newdihedrals;
799 for(i=0;i<molInsts.
size();i++) {
800 n += molInsts[i]->getNum() *
801 molInsts[i]->getMol()->getNumAtoms();
810 int *residue_number,
char *residue_name,
811 char *atom_name,
char *atom_type,
int *atom_typenum,
820 for(i=0;i<molInsts.
size();i++) {
821 int numnew = molInsts[i]->getNumAtoms();
822 int resmol = molInsts[i]->getMol()->getNumRes();
823 int newres = molInsts[i]->getNumRes();
825 if(natoms+numnew-1 >= n) {
827 int localnum = (n-natoms) % molInsts[i]->getMol()->getNumAtoms();
828 int instnum = (n-natoms) / molInsts[i]->getMol()->getNumAtoms();
831 const GenericAtom *a = molInsts[i]->getMol()->getAtom(localnum);
832 int residue = resnum + resmol*instnum + a->
getResNum();
834 *residue_number = residue;
837 strncpy(atom_type,a->
getType(),11);
851 const char *theResType,
const char *theAtomName,
854 typeNum = theTypeNum;
856 strncpy(resType,theResType,
NAMESIZE+1);
857 strncpy(atomName,theAtomName,
NAMESIZE+1);
901 int atoml,
int type) {
908 const char *theResType,
const char *theAtomName,
911 atomList.
add(
new GenericAtom(theType,theTypeNum,theResNum,theResType,
912 theAtomName,theCharge,theMass));
917 name = strdup(theName);
923 if(n >= bondList.
size() || n<0) {
924 fprintf(stderr,
"Bond index %d out of bounds.\n",n);
933 if(n >= angleList.
size() || n<0) {
934 fprintf(stderr,
"Angle index %d out of bounds.\n",n);
943 if(n >= dihedralList.
size() || n<0) {
944 fprintf(stderr,
"Dihedral index %d out of bounds.\n",n);
947 return dihedralList[n];
953 if(n >= atomList.
size() || n<0) {
954 fprintf(stderr,
"Atom index %d out of bounds for %s.\n",n,name);
993 for(i=0;i<b0Array.
size();i++) {
994 if(fabs(b0-b0Array[i])<0.00001 &&
995 fabs(kB-kBArray[i])<0.00001 &&
996 funct == functArray[i]) {
1004 functArray.
add(funct);
1005 typeaArray.
add(NULL);
1006 typebArray.
add(NULL);
1007 return b0Array.
size()-1;
1019 for(i=0;i<th0Array.
size();i++) {
1020 if(fabs(th0-th0Array[i])<0.00001 &&
1021 fabs(kth-kthArray[i])<0.00001 &&
1022 funct == functArray[i]) {
1030 functArray.
add(funct);
1031 typeaArray.
add(NULL);
1032 typebArray.
add(NULL);
1033 typecArray.
add(NULL);
1034 return th0Array.
size()-1;
1044 if(funct==1 || funct==2) {
1050 for(i=0;i<cArray.
size();i++) {
1052 if(mult != multArray[i])
continue;
1053 if(funct != functArray[i])
continue;
1055 for(j=0;j<jmax;j++) {
1056 if(fabs(c[j]-cArray[i][j])>=0.00001) {
1068 addType(NULL,NULL,c,mult,funct);
1069 return cArray.
size()-1;
1086 angleTable.
getParams(num,th0,kth,funct);
1091 dihedralTable.
getParams(num,c,mult,funct);
1100 Real *gaussRepulsive) {
1101 pairTable.
getPairGaussArrays2(indexA, indexB, gaussA, gaussMu1, gaussSigma1, gaussMu2, gaussSigma2, gaussRepulsive);
1113 *funct=functArray[num];
1122 *funct=functArray[num];
1132 *funct=functArray[num];
1134 if(*funct==1 || *funct==2) {
1135 c[0]=cArray[num][0];
1136 c[1]=cArray[num][1];
1137 }
else if(*funct==3) {
1139 c[i]=cArray[num][i];
1142 fprintf(stderr,
"Bad function number %d - don't know what to do!\n",
1148 *mult=multArray[num];
1155 const char *typec,
float th0,
float kth,
int funct) {
1156 typeaArray.
add(strdup(typea));
1157 typebArray.
add(strdup(typeb));
1158 typecArray.
add(strdup(typec));
1161 functArray.
add(funct);
1170 const float *c,
int mult,
int funct) {
1174 if(typea != NULL) typeaArray.
add(strdup(typea));
1175 if(typeb != NULL) typebArray.
add(strdup(typeb));
1176 functArray.
add(funct);
1178 if(funct==1) multArray.
add(mult);
1179 else multArray.
add(0);
1181 if(funct==1 || funct==2) {
1182 cNew =
new float[2];
1185 }
else if(funct==3) {
1186 cNew =
new float[6];
1191 fprintf(stderr,
"Bad function number %d - don't know what to do!\n",
1205 const char *typec,
int funct,
1206 float *th0,
float *kth)
const {
1208 for(i=0;i<th0Array.
size();i++) {
1209 if(typeaArray[i] == NULL || typebArray[i] == NULL
1210 || typecArray[i] == NULL)
continue;
1211 if( (0==strcmp(typea,typeaArray[i]) &&
1212 0==strcmp(typeb,typebArray[i]) &&
1213 0==strcmp(typec,typecArray[i]))
1214 || (0==strcmp(typec,typeaArray[i]) &&
1215 0==strcmp(typeb,typebArray[i]) &&
1216 0==strcmp(typea,typecArray[i]))
1217 && funct==functArray[i]) {
1228 const char *typec,
const char *typed,
1229 int funct,
float *c,
int *mult)
const {
1231 const char *comparea, *compareb;
1233 if(funct == 1 || funct == 3) {
1241 for(i=0;i<cArray.
size();i++) {
1242 if(typeaArray[i] == NULL || typebArray[i] == NULL)
1244 if(functArray[i] != funct)
1247 if( (0==strcmp(comparea,typeaArray[i]) &&
1248 0==strcmp(compareb,typebArray[i]))
1249 || (0==strcmp(compareb,typeaArray[i]) &&
1250 0==strcmp(comparea,typebArray[i]))
1252 if(funct==1 || funct==2) {
1256 *mult = multArray[i];
1258 }
else if(funct==3) {
1272 float b0,
float kB,
int funct) {
1275 functArray.
add(funct);
1276 typeaArray.
add(strdup(typea));
1277 typebArray.
add(strdup(typeb));
1283 int funct,
float *b0,
float *kB)
const {
1285 for(i=0;i<b0Array.
size();i++) {
1286 if(typeaArray[i] == NULL || typebArray[i] == NULL)
continue;
1287 if( (0==strcmp(typea,typeaArray[i]) &&
1288 0==strcmp(typeb,typebArray[i]))
1289 || (0==strcmp(typeb,typeaArray[i]) &&
1290 0==strcmp(typea,typebArray[i]))
1291 && funct==functArray[i]) {
1302 float c6,
float c12) {
1303 typeArray.
add(strdup(type));
1313 if(num>=mArray.
size() || num<0) {
1314 fprintf(stderr,
"atomParam index %d out of bounds!\n",num);
1317 strncpy(type,typeArray[num],
NAMESIZE+1);
1324 float *c6,
float *c12)
const {
1326 for(i=0;i<mArray.
size();i++) {
1327 if(typeArray[i]==NULL) {
1328 fprintf(stderr,
"Found NULL atom type in list.\n");
1331 if(0==strcmp(typeArray[i],type)) {
1343 int VDWTable::getIndex(
const char *typea,
const char *typeb)
const {
1345 for(i=0;i<c6Array.
size();i++) {
1346 if((0==strcmp(typea,typeAArray[i]) &&
1347 0==strcmp(typeb,typeBArray[i])) ||
1348 (0==strcmp(typeb,typeAArray[i]) &&
1349 0==strcmp(typea,typeBArray[i]))) {
1362 i = getIndex(typea,typeb);
1368 typeAArray.
add(strdup(typea));
1369 typeBArray.
add(strdup(typeb));
1373 c12PairArray.
add(0);
1382 i = getIndex(typea,typeb);
1384 c6PairArray[i] = c6pair;
1385 c12PairArray[i] = c12pair;
1388 typeAArray.
add(strdup(typea));
1389 typeBArray.
add(strdup(typeb));
1390 c6PairArray.
add(c6pair);
1391 c12PairArray.
add(c12pair);
1404 i = getIndex(typea,typeb);
1408 *c6pair = c6PairArray[i];
1409 *c12pair = c12PairArray[i];
1420 Real c6a,c6b,c12a,c12b, mjunk, qjunk;
1421 char typea[11]=
"",typeb[11]=
"";
1427 fprintf(stderr,
"Failed to get name of atom %d\n",numa);
1431 fprintf(stderr,
"Failed to get name of atom %d\n",numb);
1436 i = vdwTable.
getParams(typea,typeb,c6,c12,c6pair,c12pair);
1446 ret = atomTable.
getParams(typea, &mjunk, &qjunk, &c6a, &c12a);
1448 fprintf(stderr,
"Couldn't find atom type %s\n",typea);
1451 ret = atomTable.
getParams(typeb, &mjunk, &qjunk, &c6b, &c12b);
1453 fprintf(stderr,
"Couldn't find atom type %s\n",typeb);
1457 *c6 = (float)(sqrt(c6a * c6b));
1458 *c12 = (float)(sqrt(c12a*c12b));
1461 *c6pair = *c6 * fudgeLJ;
1462 *c12pair = *c12 * fudgeLJ;
1475 pairlistLJ.
add(glp);
1485 pairlistLJ.
add(glp2);
1492 return addPairGaussType2(indexA, indexB, gaussA, gaussMu1, gaussSigma1, 0.0, 0.0, 0.0);
1496 Real gaussSigma1,
Real gaussRepulsive) {
1497 return addPairGaussType2(indexA, indexB, gaussA, gaussMu1, gaussSigma1, 0.0, 0.0, gaussRepulsive);
1502 Real gaussRepulsive) {
1507 ggp.
gMu1 = gaussMu1;
1512 pairlistGauss.
add(ggp);
1518 ggp2.
gMu1 = gaussMu1;
1524 pairlistGauss.
add(ggp2);
1533 indexA[i] = pairlistLJ[i].indxLJA;
1534 indexB[i] = pairlistLJ[i].indxLJB;
1535 pairC6[i] = pairlistLJ[i].c6pair;
1536 pairC12[i] = pairlistLJ[i].c12pair;
1542 Real *gaussRepulsive) {
1545 indexA[i] = pairlistGauss[i].indxGaussA;
1546 indexB[i] = pairlistGauss[i].indxGaussB;
1547 gaussA[i] = pairlistGauss[i].gA;
1548 gaussMu1[i] = pairlistGauss[i].gMu1;
1549 gaussSigma1[i] = pairlistGauss[i].giSigma1;
1550 gaussMu2[i] = pairlistGauss[i].gMu2;
1551 gaussSigma2[i] = pairlistGauss[i].giSigma2;
1552 gaussRepulsive[i] = pairlistGauss[i].gRepulsive;
int getParams(const char *type, Real *m, Real *q, Real *c6, Real *c12) const
GenericMol(const char *theName)
int addPairGaussType2(int typea, int typeb, Real gA, Real gMu1, Real gSigma1)
GenericBond(int i, int j, int theType)
void getAtom(int num, int *residue_number, char *residue_name, char *atom_name, char *atom_type, int *atom_typenum, Real *charge, Real *mass) const
const char * getResType() const
void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12)
void getParams(int num, Real *c, int *mult, int *funct) const
static bool GroGaussCompare(GroGaussPair, GroGaussPair)
void getDihedralParams(int num, Real *c, int *mult, int *funct) const
void add14Type(const char *typea, const char *typeb, Real c6pair, Real c12pair)
bool bool_negative_number_warning_flag
void addType(const char *type, Real m, Real q, Real c6, Real c12)
ResizeArray< int > exclusions_atom_j
void getBond(int num, int *atomi, int *atomj, int *bondtype) const
const GenericMol * getMol() const
std::ostream & iWARN(std::ostream &s)
int add(const Elem &elem)
const char * getAtomName() const
void addType(const char *typea, const char *typeb, const char *typec, Real th0, Real kth, int funct)
ResizeArray< int > exclusions_atom_i
void getAngleParams(int num, Real *th0, Real *kth, int *funct) const
void getVDWParams(int typea, int typeb, Real *c6, Real *c12, Real *c6pair, Real *c7) const
int getIndex(Real b0, Real kB, int funct)
int getIndex(Real th0, Real kth, int funct)
void addType(const char *typea, const char *typeb, const Real *c, int mult, int funct)
const char * getType() const
const GenericDihedral * getDihedral(int n) const
void getType(int num, char *type) const
void getAtomParams(int num, char *type) const
GromacsTopFile(char *filename)
int getNumDihedrals() const
void getParams(int num, Real *th0, Real *kth, int *funct) const
int addPairLJType2(int typea, int typeb, Real c6, Real c12)
void addAngle(int atomi, int atomj, int atomk, int type)
void getAngle(int num, int *atomi, int *atomj, int *atomk, int *angletype) const
void NAMD_die(const char *err_msg)
const GenericAtom * getAtom(int n) const
void addType(const char *typea, const char *typeb, Real c6, Real c12)
void addType(const char *typea, const char *typeb, Real b0, Real kB, int funct)
#define JOULES_PER_CALORIE
int getNumDihedrals() const
int getNumGaussPair() const
int getNumDihedrals() const
void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12)
int getIndex(const Real *c, int mult, int funct)
static bool GroLJCompare(GroLJPair, GroLJPair)
GenericAngle(int i, int j, int k, int theType)
void getExclusions(int *, int *) const
void getBondParams(int num, Real *b0, Real *kB, int *funct) const
const GenericBond * getBond(int n) const
void getDihedral(int num, int *atomi, int *atomj, int *atomk, int *atoml, int *type) const
void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1, Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2, Real *gaussRepulsive)
void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1, Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2, Real *gaussRepulsive)
int getParams(const char *typea, const char *typeb, Real *c6, Real *c12, Real *c6pair, Real *c12pair) const
void addBond(int atomi, int atomj, int type)
const GenericAngle * getAngle(int n) const
void addDihedral(int atomi, int atomj, int atomk, int atoml, int type)
int getNumExclusions() const
GenericAtom(const char *theType, int theTypeNum, int theResNum, const char *theResType, const char *theAtomName, Real theCharge, Real theMass)
void getParams(int num, Real *b0, Real *kB, int *funct) const
GenericDihedral(int i, int j, int k, int l, int theType)
void addAtom(const char *theType, int theTypeNum, int theResNum, const char *theResType, const char *theAtomName, Real theCharge, Real theMass)
MolInst(const GenericMol *theMol, int theNum)