Ejemplo n.º 1
0
unsigned AtomValuePack::setupAtomsFromLinkCells( const std::vector<unsigned>& cind, const Vector& cpos, const LinkCells& linkcells ){
  natoms=cind.size(); for(unsigned i=0;i<natoms;++i) indices[i]=cind[i];
  linkcells.retrieveNeighboringAtoms( cpos, natoms, indices ); 
  for(unsigned i=0;i<natoms;++i) myatoms[i]=mycolv->getPositionOfAtomForLinkCells( indices[i] ) - cpos;
  if( mycolv->usesPbc() ) mycolv->applyPbc( myatoms, natoms );
  return natoms;
}
Ejemplo n.º 2
0
unsigned AtomValuePack::setupAtomsFromLinkCells( const unsigned& cind, const Vector& cpos, const LinkCells& linkcells ){
  indices[0]=cind; natoms=1; linkcells.retrieveNeighboringAtoms( cpos, natoms, indices );
  myatoms[0]=Vector(0.0,0.0,0.0);
  for(unsigned i=1;i<natoms;++i) myatoms[i]=mycolv->getPositionOfAtomForLinkCells( indices[i] ) - cpos;
  if( mycolv->usesPbc() ) mycolv->applyPbc( myatoms, natoms );
  return natoms;
}