232 |
|
} |
233 |
|
} |
234 |
|
|
235 |
< |
void InteractionManager::do_prepair(int *atid1, int *atid2, RealType *rij, RealType *rho_i_at_j, RealType *rho_j_at_i){ |
235 |
> |
void InteractionManager::doPrePair(int *atid1, int *atid2, RealType *rij, RealType *rho_i_at_j, RealType *rho_j_at_i){ |
236 |
|
|
237 |
|
if (!initialized_) initialize(); |
238 |
|
|
256 |
|
return; |
257 |
|
} |
258 |
|
|
259 |
< |
void InteractionManager::do_preforce(int *atid, RealType *rho, RealType *frho, RealType *dfrhodrho){ |
259 |
> |
void InteractionManager::doPreForce(int *atid, RealType *rho, RealType *frho, RealType *dfrhodrho){ |
260 |
|
|
261 |
|
if (!initialized_) initialize(); |
262 |
|
|
279 |
|
return; |
280 |
|
} |
281 |
|
|
282 |
< |
void InteractionManager::do_pair(int *atid1, int *atid2, RealType *d, RealType *r, RealType *r2, RealType *rcut, RealType *sw, RealType *vdwMult,RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *A1, RealType *A2, RealType *t1, RealType *t2, RealType *rho1, RealType *rho2, RealType *dfrho1, RealType *dfrho2, RealType *fshift1, RealType *fshift2){ |
282 |
> |
void InteractionManager::doPair(int *atid1, int *atid2, RealType *d, RealType *r, RealType *r2, RealType *rcut, RealType *sw, RealType *vdwMult,RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *A1, RealType *A2, RealType *t1, RealType *t2, RealType *rho1, RealType *rho2, RealType *dfrho1, RealType *dfrho2, RealType *fshift1, RealType *fshift2){ |
283 |
|
|
284 |
|
if (!initialized_) initialize(); |
285 |
|
|
331 |
|
return; |
332 |
|
} |
333 |
|
|
334 |
< |
void InteractionManager::do_skip_correction(int *atid1, int *atid2, RealType *d, RealType *r, RealType *skippedCharge1, RealType *skippedCharge2, RealType *sw, RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *t1, RealType *t2){ |
334 |
> |
void InteractionManager::doSkipCorrection(int *atid1, int *atid2, RealType *d, RealType *r, RealType *skippedCharge1, RealType *skippedCharge2, RealType *sw, RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *t1, RealType *t2){ |
335 |
|
|
336 |
|
if (!initialized_) initialize(); |
337 |
|
|
377 |
|
return; |
378 |
|
} |
379 |
|
|
380 |
< |
void InteractionManager::do_self_correction(int *atid, RealType *eFrame, RealType *skippedCharge, RealType *pot, RealType *t){ |
380 |
> |
void InteractionManager::doSelfCorrection(int *atid, RealType *eFrame, RealType *skippedCharge, RealType *pot, RealType *t){ |
381 |
|
|
382 |
|
if (!initialized_) initialize(); |
383 |
|
|
403 |
|
t[2] = scdat.t.z(); |
404 |
|
|
405 |
|
return; |
406 |
+ |
} |
407 |
+ |
|
408 |
+ |
|
409 |
+ |
RealType InteractionManager::getSuggestedCutoffRadius(int *atid) { |
410 |
+ |
if (!initialized_) initialize(); |
411 |
+ |
|
412 |
+ |
AtomType* atype = typeMap_[*atid]; |
413 |
+ |
|
414 |
+ |
pair<AtomType*, AtomType*> key = make_pair(atype, atype); |
415 |
+ |
set<NonBondedInteraction*>::iterator it; |
416 |
+ |
RealType cutoff = 0.0; |
417 |
+ |
|
418 |
+ |
for (it = interactions_[key].begin(); it != interactions_[key].end(); ++it) |
419 |
+ |
cutoff = max(cutoff, (*it)->getSuggestedCutoffRadius(atype, atype)); |
420 |
+ |
return cutoff; |
421 |
|
} |
422 |
|
|
423 |
|
} //end namespace OpenMD |
434 |
|
void fortranDoPrePair(int *atid1, int *atid2, RealType *rij, |
435 |
|
RealType *rho_i_at_j, RealType *rho_j_at_i) { |
436 |
|
|
437 |
< |
return OpenMD::InteractionManager::Instance()->do_prepair(atid1, atid2, rij, |
438 |
< |
rho_i_at_j, |
439 |
< |
rho_j_at_i); |
437 |
> |
return OpenMD::InteractionManager::Instance()->doPrePair(atid1, atid2, rij, |
438 |
> |
rho_i_at_j, |
439 |
> |
rho_j_at_i); |
440 |
|
} |
441 |
|
void fortranDoPreforce(int *atid, RealType *rho, RealType *frho, |
442 |
|
RealType *dfrhodrho) { |
443 |
|
|
444 |
< |
return OpenMD::InteractionManager::Instance()->do_preforce(atid, rho, frho, |
445 |
< |
dfrhodrho); |
444 |
> |
return OpenMD::InteractionManager::Instance()->doPreForce(atid, rho, frho, |
445 |
> |
dfrhodrho); |
446 |
|
} |
447 |
|
|
448 |
|
void fortranDoPair(int *atid1, int *atid2, RealType *d, RealType *r, |
454 |
|
RealType *dfrho1, RealType *dfrho2, RealType *fshift1, |
455 |
|
RealType *fshift2){ |
456 |
|
|
457 |
< |
return OpenMD::InteractionManager::Instance()->do_pair(atid1, atid2, d, r, r2, rcut, |
458 |
< |
sw, vdwMult, electroMult, pot, |
459 |
< |
vpair, f1, eFrame1, eFrame2, |
460 |
< |
A1, A2, t1, t2, rho1, rho2, |
461 |
< |
dfrho1, dfrho2, fshift1, fshift2); |
457 |
> |
return OpenMD::InteractionManager::Instance()->doPair(atid1, atid2, d, r, |
458 |
> |
r2, rcut, sw, |
459 |
> |
vdwMult, electroMult, |
460 |
> |
pot, vpair, f1, |
461 |
> |
eFrame1, eFrame2, |
462 |
> |
A1, A2, t1, t2, rho1, |
463 |
> |
rho2, dfrho1, dfrho2, |
464 |
> |
fshift1, fshift2); |
465 |
|
} |
466 |
< |
|
467 |
< |
void fortranDoSkipCorrection(int *atid1, int *atid2, RealType *d, RealType *r, |
468 |
< |
RealType *skippedCharge1, RealType *skippedCharge2, |
469 |
< |
RealType *sw, RealType *electroMult, RealType *pot, |
466 |
> |
|
467 |
> |
void fortranDoSkipCorrection(int *atid1, int *atid2, RealType *d, |
468 |
> |
RealType *r, RealType *skippedCharge1, |
469 |
> |
RealType *skippedCharge2, RealType *sw, |
470 |
> |
RealType *electroMult, RealType *pot, |
471 |
|
RealType *vpair, RealType *f1, |
472 |
|
RealType *eFrame1, RealType *eFrame2, |
473 |
|
RealType *t1, RealType *t2){ |
474 |
|
|
475 |
< |
return OpenMD::InteractionManager::Instance()->do_skip_correction(atid1, atid2, d, r, |
476 |
< |
skippedCharge1, |
477 |
< |
skippedCharge2, |
478 |
< |
sw, electroMult, pot, |
479 |
< |
vpair, f1, eFrame1, |
480 |
< |
eFrame2, t1, t2); |
475 |
> |
return OpenMD::InteractionManager::Instance()->doSkipCorrection(atid1, |
476 |
> |
atid2, d, |
477 |
> |
r, |
478 |
> |
skippedCharge1, |
479 |
> |
skippedCharge2, |
480 |
> |
sw, electroMult, pot, |
481 |
> |
vpair, f1, eFrame1, |
482 |
> |
eFrame2, t1, t2); |
483 |
|
} |
484 |
< |
|
484 |
> |
|
485 |
|
void fortranDoSelfCorrection(int *atid, RealType *eFrame, RealType *skippedCharge, |
486 |
|
RealType *pot, RealType *t) { |
487 |
|
|
488 |
< |
return OpenMD::InteractionManager::Instance()->do_self_correction(atid, eFrame, |
489 |
< |
skippedCharge, |
490 |
< |
pot, t); |
488 |
> |
return OpenMD::InteractionManager::Instance()->doSelfCorrection(atid, |
489 |
> |
eFrame, |
490 |
> |
skippedCharge, |
491 |
> |
pot, t); |
492 |
|
} |
493 |
< |
RealType fortranGetCutoff() { |
494 |
< |
return OpenMD::InteractionManager::Instance()->getCutoff(); |
493 |
> |
RealType fortranGetCutoff(int *atid) { |
494 |
> |
return OpenMD::InteractionManager::Instance()->getSuggestedCutoffRadius(atid); |
495 |
|
} |
496 |
|
} |