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

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

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