patch for spin density (periodic only)

git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6186 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
Jaron Krogel 2014-01-27 19:48:55 +00:00
parent 927de06e6f
commit b4cee3e077
1 changed files with 7 additions and 7 deletions

View File

@ -200,16 +200,16 @@ namespace qmcplusplus
for(int ps=0;ps<species_size[s];++ps,++p)
{
PosType u = cell.toUnit(P.R[p]-corner);
bool inside = true;
for(int d=0;d<DIM;++d)
inside &= u[d]>0.0 && u[d]<1.0;
if(inside)
{
//bool inside = true;
//for(int d=0;d<DIM;++d)
// inside &= u[d]>0.0 && u[d]<1.0;
//if(inside)
//{
int point=offset;
for(int d=0;d<DIM;++d)
point += gdims[d]*((int)(u[d]*grid[d]));
point += gdims[d]*((int)(grid[d]*(u[d]-std::floor(u[d])))); //periodic only
P.Collectables[point] += w;
}
//}
}
return 0.0;
}