parameters: (self, period)
docstring: Set the collision period.
  
          Args:
              period (int): New collision period.
  
          The MPCD collision period can only be changed to a new value on a
          simulation timestep that is a multiple of both the previous *period*
          and the new *period*. An error will be raised if it is not.
  
          Examples::
  
              # The initial period is 5.
              # The period can be updated to 2 on step 10.
              hoomd.run_upto(10)
              method.set_period(period=2)
  
              # The period can be updated to 4 on step 12.
              hoomd.run_upto(12)
              hoomd.set_period(period=4)
docstring_summary: Set the collision period.
docstring_tokens: Set the collision period .
function: def set_period(self, period):
          """ Set the collision period.
  
          Args:
              period (int): New collision period.
  
          The MPCD collision period can only be changed to a new value on a
          simulation timestep that is a multiple of both the previous *period*
          and the new *period*. An error will be raised if it is not.
  
          Examples::
  
              # The initial period is 5.
              # The period can be updated to 2 on step 10.
              hoomd.run_upto(10)
              method.set_period(period=2)
  
              # The period can be updated to 4 on step 12.
              hoomd.run_upto(12)
              hoomd.set_period(period=4)
  
          """
  
          cur_tstep = hoomd.context.current.system.getCurrentTimeStep()
          if cur_tstep % self.period != 0 or cur_tstep % period != 0:
              hoomd.context.current.device.cpp_msg.error(
                  'mpcd.collide: collision period can only be changed on multiple of current and new period.\n'
              )
              raise RuntimeError(
                  'collision period can only be changed on multiple of current and new period'
              )
  
          self._cpp.setPeriod(cur_tstep, period)
          self.period = period
function_tokens: def set_period ( self , period ) : cur_tstep = hoomd . context . current . system . getCurrentTimeStep ( ) if cur_tstep % self . period != 0 or cur_tstep % period != 0 : hoomd . context . current . device . cpp_msg . error ( 'mpcd.collide: collision period can only be changed on multiple of current and new period.\n' ) raise RuntimeError ( 'collision period can only be changed on multiple of current and new period' ) self . _cpp . setPeriod ( cur_tstep , period ) self . period = period