| 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). | 
| 39 | < | * [4]  Vardeman & Gezelter, in progress (2009). | 
| 39 | > | * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010). | 
| 40 | > | * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). | 
| 41 |  | */ | 
| 42 |  |  | 
| 43 |  | /** | 
| 52 |  | #include "UseTheForce/ForceField.hpp" | 
| 53 |  | #include "utils/simError.h" | 
| 54 |  | #include "utils/Tuple.hpp" | 
| 55 | + | #include "types/LennardJonesAdapter.hpp" | 
| 56 | + |  | 
| 57 |  | namespace OpenMD { | 
| 58 |  |  | 
| 59 |  | ForceField::ForceField() { | 
| 637 |  | } | 
| 638 |  |  | 
| 639 |  | RealType ForceField::getRcutFromAtomType(AtomType* at) { | 
| 637 | – | /**@todo */ | 
| 638 | – | GenericData* data; | 
| 640 |  | RealType rcut = 0.0; | 
| 641 |  |  | 
| 642 | < | if (at->isLennardJones()) { | 
| 643 | < | data = at->getPropertyByName("LennardJones"); | 
| 644 | < | if (data != NULL) { | 
| 644 | < | LJParamGenericData* ljData = dynamic_cast<LJParamGenericData*>(data); | 
| 645 | < |  | 
| 646 | < | if (ljData != NULL) { | 
| 647 | < | LJParam ljParam = ljData->getData(); | 
| 648 | < |  | 
| 649 | < | //by default use 2.5*sigma as cutoff radius | 
| 650 | < | rcut = 2.5 * ljParam.sigma; | 
| 651 | < |  | 
| 652 | < | } else { | 
| 653 | < | sprintf( painCave.errMsg, | 
| 654 | < | "Can not cast GenericData to LJParam\n"); | 
| 655 | < | painCave.severity = OPENMD_ERROR; | 
| 656 | < | painCave.isFatal = 1; | 
| 657 | < | simError(); | 
| 658 | < | } | 
| 659 | < | } else { | 
| 660 | < | sprintf( painCave.errMsg, "Can not find Parameters for LennardJones\n"); | 
| 661 | < | painCave.severity = OPENMD_ERROR; | 
| 662 | < | painCave.isFatal = 1; | 
| 663 | < | simError(); | 
| 664 | < | } | 
| 642 | > | LennardJonesAdapter lja = LennardJonesAdapter(at); | 
| 643 | > | if (lja.isLennardJones()) { | 
| 644 | > | rcut = 2.5 * lja.getSigma(); | 
| 645 |  | } | 
| 646 |  | return rcut; | 
| 647 |  | } |