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

Comparing:
branches/mmeineke/OOPSE/libmdtools/ForceFields.cpp (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/libmdtools/ForceFields.cpp (file contents), Revision 424 by mmeineke, Thu Mar 27 20:36:16 2003 UTC

# Line 11 | Line 11 | void ForceFields::doForces( int calcPot, int calcStres
11   #include "fortranWrappers.hpp"
12  
13  
14 + void ForceFields::calcRcut( void ){
15 +
16 + #ifdef IS_MPI
17 +  double tempBig = bigSigma;
18 +  MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX );
19 + #endif  //is_mpi
20 +
21 +  //calc rCut and rList
22 +
23 +  entry_plug->rCut = 2.5 bigSigma;
24 +  if(entry_plug->rCut > (entry_plug->box_x / 2.0))
25 +    entry_plug->rCut = entry_plug->box_x / 2.0;
26 +  if(entry_plug->rCut > (entry_plug->box_y / 2.0))
27 +    entry_plug->rCut = entry_plug->box_y / 2.0;
28 +  if(entry_plug->rCut > (entry_plug->box_z / 2.0))
29 +    entry_plug->rCut = entry_plug->box_z / 2.0;
30 +  
31 +  entry_plug->rList = entry_plug->rCut + 1.0;
32 +  
33 + }
34 +
35   void ForceFields::doForces( int calcPot, int calcStress ){
36  
37    int i, isError;
# Line 21 | Line 42 | void ForceFields::doForces( int calcPot, int calcStres
42    double* A;
43    double* u_l;
44  
45 +
46    short int passedCalcPot = (short int)calcPot;
47    short int passedCalcStress = (short int)calcStress;
48  
# Line 31 | Line 53 | void ForceFields::doForces( int calcPot, int calcStres
53      entry_plug->atoms[i]->zeroForces();
54    }
55  
56 +  for(i=0; i<entry_plug->n_mol; i++ ){
57 +    entry_plug->molecules[i]->calc_forces();
58 +  }
59 +
60    frc = Atom::getFrcArray();
61    pos = Atom::getPosArray();
62    trq = Atom::getTrqArray();
63    A   = Atom::getAmatArray();
64    u_l = Atom::getUlArray();
39
65    tau = entry_plug->tau;
66 <    
66 >
67 >  
68    isError = 0;
69    entry_plug->lrPot = 0.0;
70 +
71 +  
72    fortranForceLoop( pos,
73                      A,
74                      u_l,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines