Logo Search packages:      
Sourcecode: cdk version File versions  Download package

void org::openscience::cdk::modeling::forcefield::Torsions::setGradientMMFF94SumET ( GVector  coords3d ) [inline]

Evaluate the gradient of the torsions term.

Parameters:
coords3dCurrent molecule coordinates.

Definition at line 307 of file Torsions.java.

References setPhi().

Referenced by set2ndOrderErrorApproximateHessianMMFF94SumET().

                                                           {

            gradientMMFF94SumET.setSize(coords3d.getSize());
            //logger.debug("Set phi for torsion energy gradient calculation");
            setPhi(coords3d);
            dPhi.setSize(coords3d.getSize());

            double sumGradientET;
            for (int i = 0; i < gradientMMFF94SumET.getSize(); i++) {

                  sumGradientET = 0;
                  dPhi.setElement(i,1);                 // dPhi : partial derivative of phi. To change in the future

                  for (int m = 0; m < torsionNumber; m++) {

                        sumGradientET = sumGradientET - v1[m] * Math.sin(phi[m]) * dPhi.getElement(i) + 
                              v2[m] * Math.sin(2 * phi[m]) * 2 * dPhi.getElement(i) - 
                              v3[m] * Math.sin(3 * phi[m]) * 3 * dPhi.getElement(i);
                  }
                  gradientMMFF94SumET.setElement(i, sumGradientET);
            }
            //logger.debug("gradientMMFF94SumET = " + gradientMMFF94SumET);
      }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index