55 |
|
#include "primitives/Molecule.hpp" |
56 |
|
#include "primitives/StuntDouble.hpp" |
57 |
|
#include "UseTheForce/DarkSide/neighborLists_interface.h" |
58 |
+ |
#include "UseTheForce/doForces_interface.h" |
59 |
|
#include "utils/MemoryUtils.hpp" |
60 |
|
#include "utils/simError.h" |
61 |
|
#include "selection/SelectionManager.hpp" |
132 |
|
//equal to the total number of atoms minus number of atoms belong to |
133 |
|
//cutoff group defined in meta-data file plus the number of cutoff |
134 |
|
//groups defined in meta-data file |
135 |
+ |
std::cerr << "nGA = " << nGlobalAtoms_ << "\n"; |
136 |
+ |
std::cerr << "nCA = " << nCutoffAtoms << "\n"; |
137 |
+ |
std::cerr << "nG = " << nGroups << "\n"; |
138 |
+ |
|
139 |
|
nGlobalCutoffGroups_ = nGlobalAtoms_ - nCutoffAtoms + nGroups; |
140 |
+ |
|
141 |
+ |
std::cerr << "nGCG = " << nGlobalCutoffGroups_ << "\n"; |
142 |
|
|
143 |
|
//every free atom (atom does not belong to rigid bodies) is an |
144 |
|
//integrable object therefore the total number of integrable objects |
824 |
|
} |
825 |
|
} |
826 |
|
|
827 |
< |
//fill ident array of local atoms (it is actually ident of |
821 |
< |
//AtomType, it is so confusing !!!) |
822 |
< |
vector<int> identArray; |
827 |
> |
// Build the identArray_ |
828 |
|
|
829 |
< |
//to avoid memory reallocation, reserve enough space identArray |
830 |
< |
identArray.reserve(getNAtoms()); |
826 |
< |
|
829 |
> |
identArray_.clear(); |
830 |
> |
identArray_.reserve(getNAtoms()); |
831 |
|
for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
832 |
|
for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { |
833 |
< |
identArray.push_back(atom->getIdent()); |
833 |
> |
identArray_.push_back(atom->getIdent()); |
834 |
|
} |
835 |
|
} |
836 |
|
|
853 |
|
int* oneThreeList = oneThreeInteractions_.getPairList(); |
854 |
|
int* oneFourList = oneFourInteractions_.getPairList(); |
855 |
|
|
856 |
< |
setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray[0], |
856 |
> |
setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray_[0], |
857 |
|
&nExclude, excludeList, |
858 |
|
&nOneTwo, oneTwoList, |
859 |
|
&nOneThree, oneThreeList, |
928 |
|
sprintf(checkPointMsg, " mpiRefresh successful.\n"); |
929 |
|
errorCheckPoint(); |
930 |
|
#endif |
931 |
+ |
|
932 |
+ |
initFortranFF(&isError); |
933 |
+ |
if (isError) { |
934 |
+ |
sprintf(painCave.errMsg, |
935 |
+ |
"initFortranFF errror: fortran didn't like something we gave it.\n"); |
936 |
+ |
painCave.isFatal = 1; |
937 |
+ |
simError(); |
938 |
+ |
} |
939 |
|
fortranInitialized_ = true; |
940 |
|
} |
941 |
|
|
973 |
|
Molecule* mol; |
974 |
|
RigidBody* rb; |
975 |
|
Atom* atom; |
976 |
+ |
CutoffGroup* cg; |
977 |
|
SimInfo::MoleculeIterator mi; |
978 |
|
Molecule::RigidBodyIterator rbIter; |
979 |
< |
Molecule::AtomIterator atomIter;; |
979 |
> |
Molecule::AtomIterator atomIter; |
980 |
> |
Molecule::CutoffGroupIterator cgIter; |
981 |
|
|
982 |
|
for (mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
983 |
|
|
987 |
|
|
988 |
|
for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { |
989 |
|
rb->setSnapshotManager(sman_); |
990 |
+ |
} |
991 |
+ |
|
992 |
+ |
for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) { |
993 |
+ |
cg->setSnapshotManager(sman_); |
994 |
|
} |
995 |
|
} |
996 |
|
|