Ignore:
Timestamp:
Apr 15, 2010, 10:54:26 AM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
32842d8
Parents:
1f591b
Message:

Changed implementation of Vector to forward operations to contained objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.cpp

    r1f591b re7ea64  
    239239    matrix = ReturnFullMatrixforSymmetric(cell_size);
    240240    Orthovector1.MatrixMultiplication(matrix);
    241     InBondvector.SubtractVector(Orthovector1); // subtract just the additional translation
     241    InBondvector -= Orthovector1; // subtract just the additional translation
    242242    Free(&matrix);
    243243    bondlength = InBondvector.Norm();
     
    272272        FirstOtherAtom->father = NULL;  // if we replace hydrogen, we mark it as our father, otherwise we are just an added hydrogen with no father
    273273      }
    274       InBondvector.Scale(&BondRescale);   // rescale the distance vector to Hydrogen bond length
     274      InBondvector *= BondRescale;   // rescale the distance vector to Hydrogen bond length
    275275      FirstOtherAtom->x = TopOrigin->x; // set coordination to origin ...
    276276      FirstOtherAtom->x = InBondvector;  // ... and add distance vector to replacement atom
     
    356356        SecondOtherAtom->x[i] = InBondvector[i] * cos(bondangle) + Orthovector1[i] * (-sin(bondangle));
    357357      }
    358       FirstOtherAtom->x.Scale(&BondRescale);  // rescale by correct BondDistance
    359       SecondOtherAtom->x.Scale(&BondRescale);
     358      FirstOtherAtom->x *= BondRescale;  // rescale by correct BondDistance
     359      SecondOtherAtom->x *= BondRescale;
    360360      //Log() << Verbose(3) << "ReScaleCheck: " << FirstOtherAtom->x.Norm() << " and " << SecondOtherAtom->x.Norm() << "." << endl;
    361361      for(int i=NDIM;i--;) { // and make relative to origin atom
Note: See TracChangeset for help on using the changeset viewer.