Handles generating one instance of a particular forcefield class from the xml
input file, and generating the xml checkpoint tags and data from an
instance of the object.
Attributes:
nbeads: The number of beads that the forcefield will be evaluated on.
weight: A scaling factor for the contribution from this forcefield.
"""
attribs={"nbeads":(InputAttribute,{"dtype":int,
"default":0,
"help":"If the forcefield is to be evaluated on a contracted ring polymer, this gives the number of beads that are used. If not specified, the forcefield will be evaluated on the full ring polymer."}),
"weight":(InputAttribute,{"dtype":float,
"default":1.0,
"help":"A scaling factor for this forcefield, to be applied before adding the force calculated by this forcefield to the total force."})
}
default_help="Base class that deals with the assigning of force calculation jobs and collecting the data."
default_label="FORCEBEADS"
defstore(self,forceb):
"""Takes a ForceBeads instance and stores a minimal representation of it.
"""Creates a ForceBeads object with a socket interface.
Handles generating one instance of a socket interface forcefield class.
Shares its attributes between InputForceBeads, which deals with creating the
forcefield, and InputInterfaceSocket, which deals with creating the socket
interface.
"""
attribs=copy(InputInterfaceSocket.attribs)
attribs.update(InputForceBeads.attribs)
default_help="Deals with the assigning of force calculation jobs to different driver codes, and collecting the data, using a socket for the data communication."
default_label="SOCKET"
defstore(self,forceb):
"""Takes a ForceField instance and stores a minimal representation of it.
Args:
forceb: A ForceBeads object with a FFSocket forcemodel object.
"""
if(nottype(forceb.f_model)isFFSocket):
raiseTypeError("The type "+type(forceb.f_model).__name__+" is not a valid socket forcefield")