Esempio n. 1
0
 def evaluatorTerms(self, universe, subset1, subset2, global_data):
     self.collectAtomTypesAndIndices(universe, global_data)
     self.collectCharges(universe, global_data)
     lj = self._getLJForceField(universe)
     es = self._getESForceField(universe)
     compound = CompoundForceField(lj, es)
     return compound.evaluatorTerms(universe, subset1, subset2, global_data)
Esempio n. 2
0
 def evaluatorTerms(self, universe, subset1, subset2, global_data):
     self.collectAtomTypesAndIndices(universe, global_data)
     self.collectCharges(universe, global_data)
     lj = self._getLJForceField(universe)
     es = self._getESForceField(universe)
     compound = CompoundForceField(lj, es)
     return compound.evaluatorTerms(universe, subset1, subset2, global_data)
Esempio n. 3
0
 def evaluatorParameters(self, universe, subset1, subset2, global_data):
     self.collectAtomTypesAndIndices(universe, global_data)
     return CompoundForceField.evaluatorParameters(self, universe, subset1,
                                                   subset2, global_data)
Esempio n. 4
0
##################################################
############## HARMONIC WELL #####################
##################################################
#
# for i in range(nmolecules):
#        ff.append(HarmonicWellForceField(universe.objectList()[i].atomList()[2], center[i][0], center[i][1], center[i][2], float(31.273e4)))

##################################################
############### EMPTY POTENTIAL ##################
##################################################

# for i in range(nmolecules):
#        for j in range(i+1,nmolecules):
#                ff.append(NoPotForceField(universe.objectList()[i].atomList()[ia],universe.objectList()[j].atomList()[ja],ia,ja))

universe.setForceField(CompoundForceField(*ff))

# Minimize
minimizer = ConjugateGradientMinimizer(universe,
                                       actions=[StandardLogOutput(50)])
minimizer(convergence=1.e-3, steps=10000)

# gradientTest(universe)
# print universe.energy()

universe.writeToFile("u.pdb")
#universe.environmentObjectList(Environment.PathIntegrals)[0].include_spring_terms = False
#universe._changed(True)
universe.initializeVelocitiesToTemperature(temperature)

rhofile = open(rhoname, "r")
Esempio n. 5
0
 def evaluatorParameters(self, universe, subset1, subset2, global_data):
     self.collectAtomTypesAndIndices(universe, global_data)
     return CompoundForceField.evaluatorParameters(self, universe,
                                                   subset1, subset2,
                                                   global_data)