def store(self, forceb): """Takes a ForceField instance and stores a minimal representation of it. Args: forceb: A ForceBeads object with a FFSocket forcemodel object. """ if (not type(forceb.f_model) is FFSocket): raise TypeError("The type " + type(forceb.f_model).__name__ + " is not a valid socket forcefield") InputForceBeads.store(self,forceb) InputInterfaceSocket.store(self,forceb.f_model.socket)
def store(self, forceb): """Takes a ForceField instance and stores a minimal representation of it. Args: forceb: A ForceBeads object with a FFSocket forcemodel object. """ if (not type(forceb.f_model) is FFSocket): raise TypeError("The type " + type(forceb.f_model).__name__ + " is not a valid socket forcefield") InputForceBeads.store(self, forceb) InputInterfaceSocket.store(self, forceb.f_model.socket)
def fetch(self): """Creates a ForceBeads object. Returns: A ForceBeads object with the correct socket parameters. """ return ForceBeads(model=FFSocket( interface=InputInterfaceSocket.fetch(self) ),nbeads=self.nbeads.fetch(),weight=self.weight.fetch() )
def fetch(self): """Creates a ForceBeads object. Returns: A ForceBeads object with the correct socket parameters. """ return ForceBeads( model=FFSocket(interface=InputInterfaceSocket.fetch(self)), nbeads=self.nbeads.fetch(), weight=self.weight.fetch())
def check(self): """Deals with optional parameters.""" InputInterfaceSocket.check(self) InputForceBeads.check(self)