ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/LJ_FF.cpp
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/LJ_FF.cpp (file contents):
Revision 294 by mmeineke, Thu Mar 6 17:04:09 2003 UTC vs.
Revision 296 by mmeineke, Thu Mar 6 20:05:39 2003 UTC

# Line 336 | Line 336 | void LJ_FF::initializeAtoms( void ){
336    // call new A_types in fortran
337    
338    int isError;
339 +
340 +  // dummy variables
341 +  int isLJ = 1;
342 +  int isDipole = 0;
343 +  int isSSD = 0;
344 +  int isGB = 0;
345 +  double w0 = 0.0;
346 +  double v0 = 0.0;
347 +  double dipole = 0.0;
348 +  
349 +  
350    currentAtomType = headAtomType;
351    while( currentAtomType != NULL ){
352      
353      if( currentAtomType->name[0] != '\0' ){
354        isError = 0;
355 <          newLJtype( &(currentAtomType->ident),
356 <                 &(currentAtomType->mass),
357 <                 &(currentAtomType->epslon),
358 <                 &(currentAtomType->sigma),
359 <                 &isError );
355 >      newAtype( &(currentAtomType->ident),
356 >                &(currentAtomType->mass),
357 >                &(currentAtomType->epslon),
358 >                &(currentAtomType->sigma),
359 >                &isLJ, &isSSD, &isDipole, &isGB, &w0, &v0, &dipole,
360 >                &isError );
361        if( isError ){
362          sprintf( painCave.errMsg,
363                   "Error initializing the \"%s\" atom type in fortran\n",
# Line 416 | Line 428 | void LJ_FF::initializeAtoms( void ){
428  
429    initFortran();
430    entry_plug->refreshSim();
431 <
431 >  
432   }
433  
434   void LJ_FF::initializeBonds( bond_pair* the_bonds ){
# Line 466 | Line 478 | void LJ_FF::doForces( int calcPot ){
478    int i, isError;
479    double* frc;
480    double* pos;
481 +  double* trq;
482    double* tau;
483    short int passedCalcPot = (short int)calcPot;
484  
# Line 478 | Line 491 | void LJ_FF::doForces( int calcPot ){
491  
492    frc = Atom::getFrcArray();
493    pos = Atom::getPosArray();
494 +  trq = Atom::getTrqArray();
495    tau = entry_plug->tau;
496  
497 +  // dummy variables
498 +  // NOTE: THIS IS A MAJOR POTENTIAL BUG!!!!!! be careful.
499 +  // that said, here we go anyway.
500 +  
501 +  double* A     = NULL;
502 +  double* mu    = NULL;
503 +  double* u_l   = NULL;
504 +    
505    isError = 0;
506 <  doLJfortran( pos, frc, &(entry_plug->lrPot), tau, &passedCalcPot, &isError );
506 >  fortranForceLoop( pos, A, mu, u_l, frc, trq, tau, &(entry_plug->lrPot),
507 >                    &passedCalcPot, &isError );
508  
509  
510    if( isError ){
# Line 513 | Line 536 | void LJ_FF::initFortran( void ){
536    }
537  
538    isError = 0;
539 <  initLJfortran( &nLocal, ident, &isError );
539 >  initfortran( &nLocal, ident, &isError );
540    
541    if(isError){
542      sprintf( painCave.errMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines