geometric/internal.py
def calcConstraintDiff(self, xyz, units=False):
        """ Calculate difference between 
        (constraint ICs evaluated at provided coordinates - constraint values).

        If units=True then the values will be returned in units of Angstrom and degrees 
        for distance and angle degrees of freedom respectively.
        """
        cDiffs = np.zeros(len(self.cPrims), dtype=float)
        for ic, c in enumerate(self.cPrims):
            # Calculate the further change needed in this constrained variable
            if type(c) is RotationA:
                ca = c
                cb = self.cPrims[ic+1]
                cc = self.cPrims[ic+2]
                if type(cb) is not RotationB or type(cc) is not RotationC:
                    raise RuntimeError('In primitive internal coordinates, RotationA must be followed by RotationB and RotationC.')
                if len(set([ca.w, cb.w, cc.w])) != 1:
                    raise RuntimeError('The triple of rotation ICs need to have the same weight.')
                cDiffs[ic] = ca.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
                cDiffs[ic+1] = cb.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
                cDiffs[ic+2] = cc.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
            elif type(c) in [RotationB, RotationC]: pass
            else:
                cDiffs[ic] = c.calcDiff(xyz, val2=self.cVals[ic])
        if units:
            return convert_angstroms_degrees(self.cPrims, cDiffs)
        else:
            return cDiffs
 Calculate difference between 
        (constraint ICs evaluated at provided coordinates - constraint values).

        If units=True then the values will be returned in units of Angstrom and degrees 
        for distance and angle degrees of freedom respectively.
        
Calculate difference between
(constraint ICs evaluated at provided coordinates - constraint values).

If units=True then the values will be returned in units of Angstrom and degrees
for distance and angle degrees of freedom respectively.
Calculate difference between ( constraint ICs evaluated at provided coordinates - constraint values ) . If units = True then the values will be returned in units of Angstrom and degrees for distance and angle degrees of freedom respectively .
def calcConstraintDiff(self, xyz, units=False):
        cDiffs = np.zeros(len(self.cPrims), dtype=float)
        for ic, c in enumerate(self.cPrims):
            if type(c) is RotationA:
                ca = c
                cb = self.cPrims[ic+1]
                cc = self.cPrims[ic+2]
                if type(cb) is not RotationB or type(cc) is not RotationC:
                    raise RuntimeError('In primitive internal coordinates, RotationA must be followed by RotationB and RotationC.')
                if len(set([ca.w, cb.w, cc.w])) != 1:
                    raise RuntimeError('The triple of rotation ICs need to have the same weight.')
                cDiffs[ic] = ca.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
                cDiffs[ic+1] = cb.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
                cDiffs[ic+2] = cc.calcDiff(xyz, val2=self.cVals[ic:ic+3]/c.w)
            elif type(c) in [RotationB, RotationC]: pass
            else:
                cDiffs[ic] = c.calcDiff(xyz, val2=self.cVals[ic])
        if units:
            return convert_angstroms_degrees(self.cPrims, cDiffs)
        else:
            return cDiffs
def calcConstraintDiff ( self , xyz , units = False ) : cDiffs = np . zeros ( len ( self . cPrims ) , dtype = float ) for ic , c in enumerate ( self . cPrims ) : if type ( c ) is RotationA : ca = c cb = self . cPrims [ ic + 1 ] cc = self . cPrims [ ic + 2 ] if type ( cb ) is not RotationB or type ( cc ) is not RotationC : raise RuntimeError ( 'In primitive internal coordinates, RotationA must be followed by RotationB and RotationC.' ) if len ( set ( [ ca . w , cb . w , cc . w ] ) ) != 1 : raise RuntimeError ( 'The triple of rotation ICs need to have the same weight.' ) cDiffs [ ic ] = ca . calcDiff ( xyz , val2 = self . cVals [ ic : ic + 3 ] / c . w ) cDiffs [ ic + 1 ] = cb . calcDiff ( xyz , val2 = self . cVals [ ic : ic + 3 ] / c . w ) cDiffs [ ic + 2 ] = cc . calcDiff ( xyz , val2 = self . cVals [ ic : ic + 3 ] / c . w ) elif type ( c ) in [ RotationB , RotationC ] : pass else : cDiffs [ ic ] = c . calcDiff ( xyz , val2 = self . cVals [ ic ] ) if units : return convert_angstroms_degrees ( self . cPrims , cDiffs ) else : return cDiffs
Calculate difference between
(constraint ICs evaluated at provided coordinates - constraint values).
Calculate difference between ( constraint ICs evaluated at provided coordinates - constraint values ) .
""" Calculate difference between 
        (constraint ICs evaluated at provided coordinates - constraint values).

        If units=True then the values will be returned in units of Angstrom and degrees 
        for distance and angle degrees of freedom respectively.
        """ # Calculate the further change needed in this constrained variable
self
xyz
units