Ejemplo n.º 1
0
   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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
   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() )
Ejemplo n.º 4
0
    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())
Ejemplo n.º 5
0
    def check(self):
        """Deals with optional parameters."""

        InputInterfaceSocket.check(self)
        InputForceBeads.check(self)
Ejemplo n.º 6
0
   def check(self):
      """Deals with optional parameters."""

      InputInterfaceSocket.check(self)
      InputForceBeads.check(self)