def setOutput(self, name, outputType, filename, nSteps): """ This routine sets up a mechanism for writing system information to file directly from the dynamics engine. This is equivalent to output constructed """ # assert outputType in __knownOutput__, "The output type specified was not recognized." __knownOutputTypes__ = ['text', 'h5py', 'binary'] assert outputType in __knownOutputTypes__, "outputType that was provided was not understood." for out in self.output: assert out.name != name, "Output class names must be unique." # now append the collective variable to the walker list. self.output.append(outputClass.outputClass(name, outputType, filename, nSteps)) def removeOutput(self): """ This routine removes the ouput pipes for information to be written to disk from the underlying dynamics engine. Right now this simply clears all existing output. """ self.output = [] return 0 walker.register(langevinWalker) if __name__ == "__main__": print 'The lanegevinWalker module is a subclass of walker:', issubclass(langevinWalker, walker)
for out in self.output: self.command("undump " + out.name) self.output = [] return 0 def get_time(self): """ Return the time associated with the state of the walker. """ return self.time def set_time(self, t): """ Set the timestep of the walker. """ self.time = t self.lmp.command("reset_timestep " + str(t)) self.propagate(0, pre="yes") return None walker.register(lammpsWalker) if __name__ == "__main__": print 'The lammpsWalker module is a subclass of walker:', issubclass(lammpsWalker, walker)
Returns --------- time : integer Returns the number of model time steps taken. """ return self.time def set_time(self, t): """Set the time of the walker. This routine expects an integer time in the number of model timesteps. Parameters ----------- t : integer An integer specifying the number of model timesteps taken. """ self.time = t self.lmp.command("reset_timestep " + str(t)) self.propagate(0, pre="yes") return None walker.register(Lammps) if __name__ == "__main__": print 'The lammpsWalker module is a subclass of walker:', issubclass(Lammps, walker)