geometric/internal.py
def calcDiff(self, xyz1, xyz2=None, val2=None):
        """
        Return the difference of the internal coordinate
        calculated for (xyz1 - xyz2).
        """
        if xyz2 is None and val2 is None:
            raise RuntimeError("Provide exactly one of xyz2 and val2")
        elif xyz2 is not None and val2 is not None:
            raise RuntimeError("Provide exactly one of xyz2 and val2")
        val1 = self.value(xyz1)
        if xyz2 is not None:
            # The "second" coordinate set is cached separately
            xyz2 = xyz2.reshape(-1, 3)
            if np.max(np.abs(xyz2-self.stored_valxyz2)) < 1e-12:
                val2 = self.stored_value2.copy()
            else:
                val2 = self.value(xyz2, store=False)
                self.stored_valxyz2 = xyz2.copy()
                self.stored_value2 = val2.copy()
        # Calculate difference in rotation vectors, modulo n*2pi displacement vectors
        return calc_rot_vec_diff(val1, val2)

        Return the difference of the internal coordinate
        calculated for (xyz1 - xyz2).
        
Return the difference of the internal coordinate
calculated for (xyz1 - xyz2).
Return the difference of the internal coordinate calculated for ( xyz1 - xyz2 ) .
def calcDiff(self, xyz1, xyz2=None, val2=None):
        if xyz2 is None and val2 is None:
            raise RuntimeError("Provide exactly one of xyz2 and val2")
        elif xyz2 is not None and val2 is not None:
            raise RuntimeError("Provide exactly one of xyz2 and val2")
        val1 = self.value(xyz1)
        if xyz2 is not None:
            xyz2 = xyz2.reshape(-1, 3)
            if np.max(np.abs(xyz2-self.stored_valxyz2)) < 1e-12:
                val2 = self.stored_value2.copy()
            else:
                val2 = self.value(xyz2, store=False)
                self.stored_valxyz2 = xyz2.copy()
                self.stored_value2 = val2.copy()
        return calc_rot_vec_diff(val1, val2)
def calcDiff ( self , xyz1 , xyz2 = None , val2 = None ) : if xyz2 is None and val2 is None : raise RuntimeError ( "Provide exactly one of xyz2 and val2" ) elif xyz2 is not None and val2 is not None : raise RuntimeError ( "Provide exactly one of xyz2 and val2" ) val1 = self . value ( xyz1 ) if xyz2 is not None : xyz2 = xyz2 . reshape ( - 1 , 3 ) if np . max ( np . abs ( xyz2 - self . stored_valxyz2 ) ) < 1e-12 : val2 = self . stored_value2 . copy ( ) else : val2 = self . value ( xyz2 , store = False ) self . stored_valxyz2 = xyz2 . copy ( ) self . stored_value2 = val2 . copy ( ) return calc_rot_vec_diff ( val1 , val2 )
Return the difference of the internal coordinate
calculated for (xyz1 - xyz2).
Return the difference of the internal coordinate calculated for ( xyz1 - xyz2 ) .
"""
        Return the difference of the internal coordinate
        calculated for (xyz1 - xyz2).
        """ # The "second" coordinate set is cached separately # Calculate difference in rotation vectors, modulo n*2pi displacement vectors
self
xyz1
xyz2
val2