ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/ForceFields.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/ForceFields.cpp (file contents):
Revision 424 by mmeineke, Thu Mar 27 20:36:16 2003 UTC vs.
Revision 443 by mmeineke, Wed Apr 2 22:19:03 2003 UTC

# Line 2 | Line 2
2  
3   #ifdef IS_MPI
4   #include <mpi.h>
5 + #include <mpi++.h>
6   #endif // is_mpi
7  
8  
# Line 20 | Line 21 | void ForceFields::calcRcut( void ){
21  
22    //calc rCut and rList
23  
24 <  entry_plug->rCut = 2.5 bigSigma;
24 >  entry_plug->rCut = 2.5 * bigSigma;
25    if(entry_plug->rCut > (entry_plug->box_x / 2.0))
26      entry_plug->rCut = entry_plug->box_x / 2.0;
27    if(entry_plug->rCut > (entry_plug->box_y / 2.0))
# Line 40 | Line 41 | void ForceFields::doForces( int calcPot, int calcStres
41    double* trq;
42    double* tau;
43    double* A;
44 <  double* u_l;
44 >  double* u_l;;
45 >  DirectionalAtom* dAtom;
46  
47 +  double ut[3];
48  
49 +  //u_l = new double[entry_plug->n_atoms];
50 +
51    short int passedCalcPot = (short int)calcPot;
52    short int passedCalcStress = (short int)calcStress;
53  
54    // forces are zeroed here, before any are acumulated.
55    // NOTE: do not rezero the forces in Fortran.
56  
57 +
58    for(i=0; i<entry_plug->n_atoms; i++){
59      entry_plug->atoms[i]->zeroForces();
60 +
61 +    if( entry_plug->atoms[i]->isDirectional() ){
62 +      dAtom = (DirectionalAtom *)entry_plug->atoms[i];
63 +      dAtom->getU(ut);
64 +    
65 +
66 +      if(dAtom->getIndex()== 1){
67 +        std::cerr << "atom 2's u_l = " << ut[0] << ", " << ut[1]
68 +                  << ", " << ut[2] << "\n";
69 +      }
70 +    }
71 +    
72    }
73  
74    for(i=0; i<entry_plug->n_mol; i++ ){
75 <    entry_plug->molecules[i]->calc_forces();
75 >    entry_plug->molecules[i].calcForces();
76    }
77  
78    frc = Atom::getFrcArray();
# Line 68 | Line 86 | void ForceFields::doForces( int calcPot, int calcStres
86    isError = 0;
87    entry_plug->lrPot = 0.0;
88  
89 +
90    
91    fortranForceLoop( pos,
92                      A,
# Line 81 | Line 100 | void ForceFields::doForces( int calcPot, int calcStres
100                      &isError );
101  
102  
103 +  //  delete[] u_l;
104 +
105    if( isError ){
106      sprintf( painCave.errMsg,
107               "Error returned from the fortran force calculation.\n" );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines