geometric/internal.py
def calcDiff(self, xyz1, xyz2=None, val2=None):
        """
        Return the difference of the internal coordinate
        calculated for c(xyz1) - c(xyz2) or c(xyz1) - val2.

        Parameters
        ----------
        xyz1 : np.ndarray
            xyz coordinates of first structure in Bohr
        xyz2 : np.ndarray
            If provided, xyz coordinates of second structure in Bohr
        val2 : float
            If provided, this is the value to subtract
        """
        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")
        if xyz2 is not None:
            val2 = self.value(xyz2)
        diff = self.value(xyz1) - val2
        if hasattr(self, 'w'):
            w = self.w
        else:
            w = 1.0
        # Divide by the weight, if exists, to get the "base" number
        diff /= w
        # Subtract out any differences of 2*pi for periodic degrees of freedom
        # (rotation ICs handled separately)
        if hasattr(self, 'isPeriodic') and self.isPeriodic:
            Plus2Pi = diff + 2*np.pi
            Minus2Pi = diff - 2*np.pi
            if np.abs(diff) > np.abs(Plus2Pi):
                diff = Plus2Pi
            if np.abs(diff) > np.abs(Minus2Pi):
                diff = Minus2Pi
        diff *= w
        return diff

        Return the difference of the internal coordinate
        calculated for c(xyz1) - c(xyz2) or c(xyz1) - val2.

        Parameters
        ----------
        xyz1 : np.ndarray
            xyz coordinates of first structure in Bohr
        xyz2 : np.ndarray
            If provided, xyz coordinates of second structure in Bohr
        val2 : float
            If provided, this is the value to subtract
        
Return the difference of the internal coordinate
calculated for c(xyz1) - c(xyz2) or c(xyz1) - val2.

Parameters

xyz1 : np.ndarray
xyz coordinates of first structure in Bohr
xyz2 : np.ndarray
If provided, xyz coordinates of second structure in Bohr
val2 : float
If provided, this is the value to subtract
Return the difference of the internal coordinate calculated for c ( xyz1 ) - c ( xyz2 ) or c ( xyz1 ) - val2 . Parameters xyz1 : np . ndarray xyz coordinates of first structure in Bohr xyz2 : np . ndarray If provided xyz coordinates of second structure in Bohr val2 : float If provided this is the value to subtract
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")
        if xyz2 is not None:
            val2 = self.value(xyz2)
        diff = self.value(xyz1) - val2
        if hasattr(self, 'w'):
            w = self.w
        else:
            w = 1.0
        diff /= w
        if hasattr(self, 'isPeriodic') and self.isPeriodic:
            Plus2Pi = diff + 2*np.pi
            Minus2Pi = diff - 2*np.pi
            if np.abs(diff) > np.abs(Plus2Pi):
                diff = Plus2Pi
            if np.abs(diff) > np.abs(Minus2Pi):
                diff = Minus2Pi
        diff *= w
        return diff
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" ) if xyz2 is not None : val2 = self . value ( xyz2 ) diff = self . value ( xyz1 ) - val2 if hasattr ( self , 'w' ) : w = self . w else : w = 1.0 diff /= w if hasattr ( self , 'isPeriodic' ) and self . isPeriodic : Plus2Pi = diff + 2 * np . pi Minus2Pi = diff - 2 * np . pi if np . abs ( diff ) > np . abs ( Plus2Pi ) : diff = Plus2Pi if np . abs ( diff ) > np . abs ( Minus2Pi ) : diff = Minus2Pi diff *= w return diff
Return the difference of the internal coordinate
calculated for c(xyz1) - c(xyz2) or c(xyz1) - val2.
Return the difference of the internal coordinate calculated for c ( xyz1 ) - c ( xyz2 ) or c ( xyz1 ) - val2 .
"""
        Return the difference of the internal coordinate
        calculated for c(xyz1) - c(xyz2) or c(xyz1) - val2.

        Parameters
        ----------
        xyz1 : np.ndarray
            xyz coordinates of first structure in Bohr
        xyz2 : np.ndarray
            If provided, xyz coordinates of second structure in Bohr
        val2 : float
            If provided, this is the value to subtract
        """ # Divide by the weight, if exists, to get the "base" number # Subtract out any differences of 2*pi for periodic degrees of freedom # (rotation ICs handled separately)
self
xyz1
xyz2
val2