| 35 |
|
* |
| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
| 39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 59 |
|
maw_ = new MAW(); |
| 60 |
|
} |
| 61 |
|
|
| 62 |
+ |
InteractionManager::~InteractionManager() { |
| 63 |
+ |
delete lj_; |
| 64 |
+ |
delete gb_; |
| 65 |
+ |
delete sticky_; |
| 66 |
+ |
delete morse_; |
| 67 |
+ |
delete repulsivePower_; |
| 68 |
+ |
delete eam_; |
| 69 |
+ |
delete sc_; |
| 70 |
+ |
delete electrostatic_; |
| 71 |
+ |
delete maw_; |
| 72 |
+ |
} |
| 73 |
+ |
|
| 74 |
|
void InteractionManager::initialize() { |
| 75 |
< |
|
| 75 |
> |
|
| 76 |
> |
if (initialized_) return; |
| 77 |
> |
|
| 78 |
|
ForceField* forceField_ = info_->getForceField(); |
| 79 |
|
|
| 80 |
|
lj_->setForceField(forceField_); |
| 99 |
|
atype1 = atomTypes->nextType(i1)) { |
| 100 |
|
|
| 101 |
|
// add it to the map: |
| 88 |
– |
AtomTypeProperties atp = atype1->getATP(); |
| 102 |
|
|
| 103 |
|
pair<map<int,AtomType*>::iterator,bool> ret; |
| 104 |
< |
ret = typeMap_.insert( pair<int, AtomType*>(atp.ident, atype1) ); |
| 104 |
> |
ret = typeMap_.insert( pair<int, AtomType*>(atype1->getIdent(), atype1) ); |
| 105 |
|
if (ret.second == false) { |
| 106 |
|
sprintf( painCave.errMsg, |
| 107 |
|
"InteractionManager already had a previous entry with ident %d\n", |
| 108 |
< |
atp.ident); |
| 108 |
> |
atype1->getIdent()); |
| 109 |
|
painCave.severity = OPENMD_INFO; |
| 110 |
|
painCave.isFatal = 0; |
| 111 |
|
simError(); |
| 123 |
|
|
| 124 |
|
bool vdwExplicit = false; |
| 125 |
|
bool metExplicit = false; |
| 126 |
< |
bool hbExplicit = false; |
| 126 |
> |
// bool hbExplicit = false; |
| 127 |
|
|
| 128 |
|
key = make_pair(atype1, atype2); |
| 129 |
|
|
| 316 |
|
eam_->setCutoffRadius(rcut); |
| 317 |
|
} |
| 318 |
|
|
| 306 |
– |
void InteractionManager::setSwitchingRadius(RealType rswitch) { |
| 307 |
– |
electrostatic_->setSwitchingRadius(rswitch); |
| 308 |
– |
} |
| 309 |
– |
|
| 319 |
|
void InteractionManager::doPrePair(InteractionData idat){ |
| 320 |
|
|
| 321 |
|
if (!initialized_) initialize(); |
| 389 |
|
|
| 390 |
|
RealType InteractionManager::getSuggestedCutoffRadius(int *atid) { |
| 391 |
|
if (!initialized_) initialize(); |
| 392 |
< |
|
| 392 |
> |
|
| 393 |
|
AtomType* atype = typeMap_[*atid]; |
| 394 |
|
|
| 395 |
|
pair<AtomType*, AtomType*> key = make_pair(atype, atype); |