コード例 #1
0
 def update_temperature(self, new_pos):
     KE, temperature, velocities = \
             md.calculate_temperature(new_pos, self.structure, self.dt,
                                      self.noa)
     self.KE = KE
     self.temperature = temperature
     self.velocities = velocities
コード例 #2
0
    def update_temperature(self):
        """Updates the instantaneous temperatures of the system.

        Args:
            new_pos (np.ndarray): Positions of atoms in the next MD frame.
        """
        KE, temperature, velocities = md.calculate_temperature(
            self.structure, self.dt, self.noa)
        self.KE = KE
        self.temperature = temperature
        self.velocities = velocities