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 |
822 |
< |
//AtomType, it is so confusing !!!) |
823 |
< |
vector<int> identArray; |
827 |
> |
// Build the identArray_ |
828 |
|
|
829 |
< |
//to avoid memory reallocation, reserve enough space identArray |
830 |
< |
identArray.reserve(getNAtoms()); |
827 |
< |
|
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 |
|
|
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 |
|
|
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 |
|
|
997 |
|
} |