debugging of dipole iterations
This commit is contained in:
@ -43,5 +43,5 @@ dump_modify 1 sort id
|
|||||||
|
|
||||||
fix 1 all nve
|
fix 1 all nve
|
||||||
|
|
||||||
thermo 10
|
thermo 1
|
||||||
run 100
|
run 5
|
||||||
|
|||||||
@ -43,5 +43,5 @@ dump_modify 1 sort id
|
|||||||
|
|
||||||
fix 1 all nve
|
fix 1 all nve
|
||||||
|
|
||||||
thermo 10
|
thermo 1
|
||||||
run 100
|
run 5
|
||||||
|
|||||||
@ -25,6 +25,10 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
#include "update.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -381,6 +385,10 @@ void PairAmoeba::induce()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
printf("CG iteration count = %d\n",iter);
|
||||||
|
|
||||||
// terminate the calculation if dipoles failed to converge
|
// terminate the calculation if dipoles failed to converge
|
||||||
// NOTE: could make this an error
|
// NOTE: could make this an error
|
||||||
|
|
||||||
|
|||||||
@ -1756,7 +1756,10 @@ void PairAmoeba::precond_neigh()
|
|||||||
choose(USOLV);
|
choose(USOLV);
|
||||||
|
|
||||||
//double off = sqrt(off2);
|
//double off = sqrt(off2);
|
||||||
|
//if (comm->me == 0) printf("PCN off %g off2 %g\n",off,off2);
|
||||||
//off2 = (off + neighbor->skin) * (off + neighbor->skin);
|
//off2 = (off + neighbor->skin) * (off + neighbor->skin);
|
||||||
|
//if (comm->me == 0)
|
||||||
|
// printf("PCNnew off %g off2 %g skin %g\n",sqrt(off2),off2,neighbor->skin);
|
||||||
|
|
||||||
// atoms and neighbor list
|
// atoms and neighbor list
|
||||||
|
|
||||||
@ -1770,6 +1773,13 @@ void PairAmoeba::precond_neigh()
|
|||||||
// store all induce neighs of owned atoms within shorter cutoff
|
// store all induce neighs of owned atoms within shorter cutoff
|
||||||
// scan longer-cutoff neighbor list of I
|
// scan longer-cutoff neighbor list of I
|
||||||
|
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
int *ncount;
|
||||||
|
memory->create(ncount,atom->nlocal,"amoeba:ncount");
|
||||||
|
for (int i = 0; i < atom->nlocal; i++) ncount[i] = 0;
|
||||||
|
|
||||||
ipage_precond->reset();
|
ipage_precond->reset();
|
||||||
|
|
||||||
for (ii = 0; ii < inum; ii++) {
|
for (ii = 0; ii < inum; ii++) {
|
||||||
@ -1793,15 +1803,38 @@ void PairAmoeba::precond_neigh()
|
|||||||
delz = ztmp - x[j][2];
|
delz = ztmp - x[j][2];
|
||||||
rsq = delx*delx + dely*dely + delz*delz;
|
rsq = delx*delx + dely*dely + delz*delz;
|
||||||
|
|
||||||
if (rsq < off2) neighptr[n++] = jlist[jj];
|
if (rsq < off2) {
|
||||||
|
neighptr[n++] = jlist[jj];
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
int jcount = atom->map(atom->tag[j]);
|
||||||
|
ncount[jcount]++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
firstneigh_precond[i] = neighptr;
|
firstneigh_precond[i] = neighptr;
|
||||||
numneigh_precond[i] = n;
|
numneigh_precond[i] = n;
|
||||||
ipage_precond->vgot(n);
|
ipage_precond->vgot(n);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
ncount[i] += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
if (update->ntimestep == 0) {
|
||||||
|
for (int i = 1; i <= atom->nlocal; i++) {
|
||||||
|
int ilocal = atom->map(i);
|
||||||
|
printf("PRECOND id %d ilocal %d numneigh %d\n",i,ilocal,ncount[ilocal]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memory->destroy(ncount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
allocate Vdwl arrays
|
allocate Vdwl arrays
|
||||||
note that n_amclass = # of classes in Tinker PRM file
|
note that n_amclass = # of classes in Tinker PRM file
|
||||||
|
|||||||
Reference in New Issue
Block a user