ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/pcm7.c
(Generate patch)
# Line 234 | Line 234
234        dipolemom.xdipole = 0.0;
235        dipolemom.ydipole = 0.0;
236        dipolemom.zdipole = 0.0;
237 <      if (pot.use_charge || pot.use_bufcharge || use_gast_chrg) charge_dipole();
238 <      if (pot.use_dipole && !use_gast_chrg) dipole_dipole();
237 >      if (pot.use_charge || pot.use_bufcharge) charge_dipole();
238 >      if (pot.use_dipole) dipole_dipole();
239        dipolemom.total = sqrt(dipolemom.xdipole*dipolemom.xdipole +
240                               dipolemom.ydipole*dipolemom.ydipole +
241                               dipolemom.zdipole*dipolemom.zdipole);
# Line 353 | Line 353
353       if (pot.use_strbnd) kstrbnd();
354        
355        if (pot.use_buck || pot.use_hal || pot.use_lj) kvdw();
356 <      if ((pot.use_charge || pot.use_bufcharge || pot.use_ewald) && !use_external_chrg && !use_gast_chrg) kcharge();
356 >      if ((pot.use_charge || pot.use_bufcharge || pot.use_ewald)) kcharge();
357  
358         if (Missing_constants == TRUE)
359         {
# Line 400 | Line 400
400        energies.eimptors = 0.0;
401        energies.eurey = 0.0;
402        energies.esolv = 0.0;
403 +      energies.egeom =0.0;
404  
405        virial.virx = 0.0;
406        virial.viry = 0.0;
# Line 425 | Line 426
426              deriv.deimprop[i][j] = 0.0;
427              deriv.dehb[i][j] = 0.0;
428              deriv.desolv[i][j] = 0.0;
429 +            deriv.degeom[i][j] = 0.0;
430          }
431        }
432    
# Line 437 | Line 439
439        // mmff
440        if (pot.use_hal) ehal1();
441        if (pot.use_bufcharge) ebufcharge1();
442 +
443 +      if (pot.use_geom) egeom1();
444      
445        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd + energies.e14+
446                          energies.evdw + energies.eu + energies.ehbond + energies.eangang + energies.estrtor +
447 <                        energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv;
447 >                        energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv + energies.egeom;
448        for (i=1; i <= natom; i++)
449        {
450            for (j=0; j < 3; j++)
# Line 448 | Line 452
452                deriv.d1[i][j] = deriv.deb[i][j] + deriv.dea[i][j] + deriv.deaa[i][j] +
453                                 deriv.destb[i][j] + deriv.detor[i][j] + deriv.deopb[i][j] + deriv.dehb[i][j] +
454                                 deriv.destor[i][j] + deriv.deqq[i][j] + deriv.devdw[i][j] + deriv.de14[i][j] +
455 <                               deriv.deimprop[i][j] + deriv.deub[i][j] + deriv.desolv[i][j];
455 >                               deriv.deimprop[i][j] + deriv.deub[i][j] + deriv.desolv[i][j] + deriv.degeom[i][j];
456  
457           }
458        }
# Line 476 | Line 480
480        energies.eopb = 0.0;
481        energies.eurey = 0.0;
482        energies.esolv = 0.0;
483 +      energies.egeom = 0.0;
484  
485        for (i=1; i <= natom; i++)
486             atom[i].energy = 0.0;
# Line 488 | Line 493
493        // mmff
494        if (pot.use_hal) ehal();
495        if (pot.use_bufcharge) ebufcharge();
496 +
497 +      if (pot.use_geom) egeom();
498                                
499        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd
500               + energies.evdw + energies.e14 + energies.ehbond + energies.eu + energies.eangang +
501 <               energies.estrtor + energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv;
501 >               energies.estrtor + energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv + energies.egeom;
502        etot = energies.total;
503        return (etot);
504   }
# Line 517 | Line 524
524        energies.eopb = 0.0;
525        energies.eurey = 0.0;
526        energies.esolv = 0.0;
527 +      energies.egeom = 0.0;
528  
529        for (i=1; i <= natom; i++)
530             atom[i].energy = 0.0;
# Line 530 | Line 538
538        if (pot.use_hal) ehal();
539        if (pot.use_bufcharge) ebufcharge();
540        
541 +      if (pot.use_geom) egeom();
542 +
543        energies.total =  energies.estr + energies.ebend + energies.etor + energies.estrbnd
544               + energies.evdw + energies.e14 + energies.ehbond + energies.eu + energies.eangang +
545 <               energies.estrtor + energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv;
545 >               energies.estrtor + energies.eimprop + energies.eimptors + energies.eopb + energies.eurey + energies.esolv + energies.egeom;
546        etot = energies.total;
547        
548        return (etot);
# Line 614 | Line 624
624                     }
625                     if (cbonds.nbnd > MAXCBND)
626                     {
627 <                      fprintf(pcmoutfile,"Error - Too many coordinated bonds!\nProgram will now quit.\n");
627 >                      fprintf(pcmlogfile,"Error - Too many coordinated bonds!\nProgram will now quit.\n");
628                         exit(0);
629                     }
630                 }
# Line 654 | Line 664
664                bonds_ff.nbnd++;
665                if (bonds_ff.nbnd > MAXBND)
666                {
667 <                 fprintf(pcmoutfile,"Error - Too many bonds!\nProgram will now quit.\n");
667 >                 fprintf(pcmlogfile,"Error - Too many bonds!\nProgram will now quit.\n");
668                   exit(0);
669                 }
670             }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines