def __init__(self, init, beads, nm, cell, fcomponents, ensemble=None, motion=None, prefix=""): """Initialises System class. Args: init: A class to deal with initializing the system. beads: A beads object giving the atom positions. cell: A cell object giving the system box. fcomponents: A list of force components that are active for each replica of the system. bcomponents: A list of force components that are considered as bias, and act on each replica of the system. ensemble: An ensemble object giving the objects necessary for producing the correct ensemble. nm: A class dealing with path NM operations. prefix: A string used to differentiate the output files of different systems. """ info(" # Initializing system object ", verbosity.low) self.prefix = prefix self.init = init self.ensemble = ensemble self.motion = motion self.beads = beads self.cell = cell self.nm = nm self.fcomp = fcomponents self.forces = Forces() self.properties = Properties() self.trajs = Trajectories()
def __init__(self, beads, cell, forces, ensemble, prng, outputs, nm, init, step=0, tsteps=1000, ttime=0): """Initialises Simulation class. Args: beads: A beads object giving the atom positions. cell: A cell object giving the system box. forces: A forcefield object giving the force calculator for each replica of the system. ensemble: An ensemble object giving the objects necessary for producing the correct ensemble. prng: A random number object. outputs: A list of output objects. nm: A class dealing with path NM operations. init: A class to deal with initializing the simulation object. step: An optional integer giving the current simulation time step. Defaults to 0. tsteps: An optional integer giving the total number of steps. Defaults to 1000. ttime: The simulation running time. Used on restart, to keep a cumulative total. """ info(" # Initializing simulation object ", verbosity.low) self.prng = prng self.ensemble = ensemble self.beads = beads self.cell = cell self.nm = nm # initialize the configuration of the system self.init = init init.init_stage1(self) self.flist = forces self.forces = Forces() self.outputs = outputs dset(self, "step", depend_value(name="step", value=step)) self.tsteps = tsteps self.ttime = ttime self.properties = Properties() self.trajs = Trajectories() self.chk = None self.rollback = True
import sys from optparse import OptionParser src_dir = ".." sys.path.append(src_dir) from ipi.engine.properties import Properties, Trajectories, help_latex __all__ = ['help_list', 'list_objects'] list_objects = {'property_list': Properties(), 'trajectory_list': Trajectories()} usage = "usage: python %prog [options]" parser = OptionParser(usage=usage) parser.add_option("-o", action="store", dest="prefix", help="Prefix for the output files", default="help") parser.add_option("-i", action="store", dest="opt", help="Root object for the help files. Options: ['property_list', 'trajectory_list']", default='property_list') parser.add_option("-r", action="store_true", dest="ref", default=False, help="If false, this creates a stand-alone document.") (options, args) = parser.parse_args() if options.opt not in list_objects: raise ValueError("Option " + options.opt + " is not a viable tag name") def help_list(option='property_list', prefix="help", standalone=True): """Writes the help file.
# i-PI Copyright (C) 2014-2015 i-PI developers # See the "licenses" directory for full license information. import sys from optparse import OptionParser src_dir = ".." sys.path.append(src_dir) from ipi.engine.properties import Properties, Trajectories, help_latex __all__ = ['help_list', 'list_objects'] list_objects = { 'property_list': Properties(), 'trajectory_list': Trajectories() } usage = "usage: python %prog [options]" parser = OptionParser(usage=usage) parser.add_option("-o", action="store", dest="prefix", help="Prefix for the output files", default="help") parser.add_option( "-i", action="store", dest="opt", help=
# This file is part of i-PI. # i-PI Copyright (C) 2014-2015 i-PI developers # See the "licenses" directory for full license information. import sys from optparse import OptionParser from ipi.engine.properties import Properties, Trajectories, help_latex src_dir = ".." sys.path.append(src_dir) __all__ = ["help_list", "list_objects"] list_objects = { "property_list": Properties(), "trajectory_list": Trajectories() } usage = "usage: python %prog [options]" parser = OptionParser(usage=usage) parser.add_option( "-o", action="store", dest="prefix", help="Prefix for the output files", default="help", ) parser.add_option( "-i", action="store",