Ignore:
Timestamp:
Apr 7, 2010, 3:45:38 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
0f55b2
Parents:
770138
Message:

Made data internal data-structure of vector class private

  • Replaced occurences of access to internals with operator
  • moved Vector-class into LinAlg-Module
  • Reworked Vector to allow clean modularization
  • Added Plane class to describe arbitrary planes in 3d space
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom.cpp

    r770138 r71910a  
    130130  if (out != NULL) {
    131131    *out << "Ion_Type" << ElementNo << "_" << AtomNo << "\t"  << fixed << setprecision(9) << showpoint;
    132     *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2];
     132    *out << x[0] << "\t" << x[1] << "\t" << x[2];
    133133    *out << "\t" << FixedIon;
    134134    if (v.Norm() > MYEPSILON)
    135       *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";
     135      *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t";
    136136    if (comment != NULL)
    137137      *out << " # " << comment << endl;
     
    155155  if (out != NULL) {
    156156    *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
    157     *out << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2];
     157    *out << x[0] << "\t" << x[1] << "\t" << x[2];
    158158    *out << "\t" << FixedIon;
    159159    if (v.Norm() > MYEPSILON)
    160       *out << "\t" << scientific << setprecision(6) << v.x[0] << "\t" << v.x[1] << "\t" << v.x[2] << "\t";
     160      *out << "\t" << scientific << setprecision(6) << v[0] << "\t" << v[1] << "\t" << v[2] << "\t";
    161161    if (comment != NULL)
    162162      *out << " # " << comment << endl;
     
    175175{
    176176  if (out != NULL) {
    177     *out << type->symbol << "\t" << x.x[0] << "\t" << x.x[1] << "\t" << x.x[2] << "\t" << endl;
     177    *out << type->symbol << "\t" << x[0] << "\t" << x[1] << "\t" << x[2] << "\t" << endl;
    178178    return true;
    179179  } else
     
    193193  if (out != NULL) {
    194194    *out << "Ion_Type" << ElementNo[type->Z] << "_" << AtomNo[type->Z] << "\t"  << fixed << setprecision(9) << showpoint;
    195     *out << Trajectory.R.at(step).x[0] << "\t" << Trajectory.R.at(step).x[1] << "\t" << Trajectory.R.at(step).x[2];
     195    *out << Trajectory.R.at(step)[0] << "\t" << Trajectory.R.at(step)[1] << "\t" << Trajectory.R.at(step)[2];
    196196    *out << "\t" << FixedIon;
    197197    if (Trajectory.U.at(step).Norm() > MYEPSILON)
    198       *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step).x[0] << "\t" << Trajectory.U.at(step).x[1] << "\t" << Trajectory.U.at(step).x[2] << "\t";
     198      *out << "\t" << scientific << setprecision(6) << Trajectory.U.at(step)[0] << "\t" << Trajectory.U.at(step)[1] << "\t" << Trajectory.U.at(step)[2] << "\t";
    199199    if (Trajectory.F.at(step).Norm() > MYEPSILON)
    200       *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step).x[0] << "\t" << Trajectory.F.at(step).x[1] << "\t" << Trajectory.F.at(step).x[2] << "\t";
     200      *out << "\t" << scientific << setprecision(6) << Trajectory.F.at(step)[0] << "\t" << Trajectory.F.at(step)[1] << "\t" << Trajectory.F.at(step)[2] << "\t";
    201201    *out << "\t# Number in molecule " << nr << endl;
    202202    return true;
     
    214214  if (out != NULL) {
    215215    *out << type->symbol << "\t";
    216     *out << Trajectory.R.at(step).x[0] << "\t";
    217     *out << Trajectory.R.at(step).x[1] << "\t";
    218     *out << Trajectory.R.at(step).x[2] << endl;
     216    *out << Trajectory.R.at(step)[0] << "\t";
     217    *out << Trajectory.R.at(step)[1] << "\t";
     218    *out << Trajectory.R.at(step)[2] << endl;
    219219    return true;
    220220  } else
     
    229229void atom::OutputMPQCLine(ofstream * const out, const Vector *center, int *AtomNo = NULL) const
    230230{
    231   *out << "\t\t" << type->symbol << " [ " << x.x[0]-center->x[0] << "\t" << x.x[1]-center->x[1] << "\t" << x.x[2]-center->x[2] << " ]" << endl;
     231  *out << "\t\t" << type->symbol << " [ " << x[0]-center->at(0) << "\t" << x[1]-center->at(1) << "\t" << x[2]-center->at(2) << " ]" << endl;
    232232  if (AtomNo != NULL)
    233233    *AtomNo++;
Note: See TracChangeset for help on using the changeset viewer.