def loadextend(self, extenddirec): SurfaceSimulation.loadextend(self, extenddirec) self.z_array[0] = numpy.sum( self.mass * self.coord[:, 2]) / self.totmass self.u0 += energyfunc.umbrellaenergy(self.coord, self.z_pin, self.mass, self.totmass) self.energyarray[0] = self.u0
def __init__(self, name, outputdirectory, coord, temp, surf_coord, z_pin, mass): self.z_pin = z_pin SurfaceSimulation.__init__(self, name, outputdirectory, coord, temp, surf_coord) self.mass = mass self.totmass = numpy.sum(mass) self.z_array = numpy.empty(Simulation.totmoves/Simulation.save + 1) self.z_array[0] = numpy.sum(mass*self.coord[:,2])/self.totmass self.u0 += energyfunc.umbrellaenergy(self.coord, self.z_pin, mass, self.totmass) self.energyarray[0] = self.u0
def update_energy(self, torschange, angchange): self.newtorsE = energyfunc.ctorsionenergy(self.newcoord, self.torsE, Simulation.torsparam, torschange) self.newangE = energyfunc.cangleenergy(self.newcoord, self.angE, Simulation.angleparam, angchange) self.newsurfE = energyfunc.csurfenergy(self.newcoord, SurfaceSimulation.surface, Simulation.numbeads, SurfaceSimulation.nspint, SurfaceSimulation.surfparam, SurfaceSimulation.scale) self.r2new, self.u1 = energyfunc.cgetLJenergy( self.newcoord, Simulation.numint, Simulation.numbeads, Simulation.nativeparam, Simulation.nonnativeparam, Simulation.nnepsil) self.u1 += numpy.sum(self.newtorsE) + numpy.sum(self.newangE) + numpy.sum( self.newsurfE) self.u1 += energyfunc.umbrellaenergy(self.newcoord, self.z_pin, self.mass, self.totmass) return self
def update_energy(self, torschange, angchange, dict): SurfaceSimulation.update_energy(self, torschange, angchange, dict) self.u1 += energyfunc.umbrellaenergy(self.newcoord, self.z_pin, self.mass, self.totmass)
def loadextend(self,extenddirec): SurfaceSimulation.loadextend(self,extenddirec) self.z_array[0] = numpy.sum(self.mass*self.coord[:,2])/self.totmass self.u0 += energyfunc.umbrellaenergy(self.coord, self.z_pin, self.mass, self.totmass) self.energyarray[0] = self.u0
def loadstate(self): SurfaceSimulation.loadstate(self) self.z_array = numpy.load('%s/z_traj%i_%i.npy' %(self.out, int(self.z_pin), int(self.T))) self.u0 += energyfunc.umbrellaenergy(self.coord, self.z_pin, self.mass, self.totmass)