def recalculate_LJ(self):
     """
     Takes the values of the LJ_radius and LJ_depth arrays and recalculates
     the LENNARD_JONES_A/BCOEF topology sections from the canonical
     combining rules.
     """
     AmberParm.recalculate_LJ(self)
     ntypes = self.pointers['NTYPES']
     acoef = self.parm_data['LENNARD_JONES_14_ACOEF']
     bcoef = self.parm_data['LENNARD_JONES_14_BCOEF']
     for i in range(ntypes):
         for j in range(i, ntypes):
             index = self.parm_data['NONBONDED_PARM_INDEX'][ntypes*i+j] - 1
             rij = self.LJ_14_radius[i] + self.LJ_14_radius[j]
             wdij = sqrt(self.LJ_14_depth[i] * self.LJ_14_depth[j])
             acoef[index] = wdij * rij ** 12
             bcoef[index] = 2 * wdij * rij**6
Exemple #2
0
 def recalculate_LJ(self):
     """
     Takes the values of the LJ_radius and LJ_depth arrays and recalculates
     the LENNARD_JONES_A/BCOEF topology sections from the canonical
     combining rules.
     """
     AmberParm.recalculate_LJ(self)
     ntypes = self.pointers['NTYPES']
     acoef = self.parm_data['LENNARD_JONES_14_ACOEF']
     bcoef = self.parm_data['LENNARD_JONES_14_BCOEF']
     for i in range(ntypes):
         for j in range(i, ntypes):
             index = self.parm_data['NONBONDED_PARM_INDEX'][ntypes * i +
                                                            j] - 1
             rij = self.LJ_14_radius[i] + self.LJ_14_radius[j]
             wdij = sqrt(self.LJ_14_depth[i] * self.LJ_14_depth[j])
             acoef[index] = wdij * rij**12
             bcoef[index] = 2 * wdij * rij**6