[MMTK] A bug in class AmberNonbondedForceField ?

Sanzo Miyazawa miyazawa at smlab.sci.gunma-u.ac.jp
Fri Jun 23 09:59:52 CEST 2006


1. There may be a bug in AmberNonbondedForceField; a line marked by "!".

*** AmberForceField.py.ORIG	Wed Dec 21 02:52:00 2005
--- AmberForceField.py	Sat May 27 18:47:11 2006
***************
*** 359,364 ****
  class AmberNonbondedForceField(MMForceField.MMNonbondedForceField):
  
      def __init__(self, lj_options = None, es_options = None):
          readAmber94()
!         MMForceField.MMNonbondedForceField.__init__(self, Amber94,
                                                      lj_options, es_options)
--- 364,370 ----
  class AmberNonbondedForceField(MMForceField.MMNonbondedForceField):
  
      def __init__(self, lj_options = None, es_options = None):
+         self.arguments = (lj_options, es_options)
          readAmber94()
!         MMForceField.MMNonbondedForceField.__init__(self, 'Amber94', Amber94,
                                                      lj_options, es_options)

2.  There may be a reason to disallow us to cool "universe"
by "heat".  The following is my choice.  


*** MMTK_dynamics.c.ORIG	Wed Dec 21 02:13:43 2005
--- MMTK_dynamics.c	Fri Jun  2 15:18:52 2006
***************
*** 1164,1171 ****
      double k_energy = 0.;
      double t, f;
      int j;
!     if (temperature > temp2)
!       temperature = temp2;
      for (j = 0; j < atoms; j++)
        k_energy += m[j]*(v[j][0]*v[j][0]+v[j][1]*v[j][1]+v[j][2]*v[j][2]);
      t = k_energy*temperature_factor/ws->df;
--- 1164,1176 ----
      double k_energy = 0.;
      double t, f;
      int j;
!     if ( gradient > 0.0 ) {
!       if (temperature > temp2)
!         temperature = temp2;
!     } else if ( gradient < 0.0 ) {
!       if (temperature < temp2)
!         temperature = temp2;
!     }
      for (j = 0; j < atoms; j++)
        k_energy += m[j]*(v[j][0]*v[j][0]+v[j][1]*v[j][1]+v[j][2]*v[j][2]);
      t = k_energy*temperature_factor/ws->df;



More information about the mmtk mailing list