[gmx-developers] insertion-deletion
Jason DeJoannis
jdejoan at emory.edu
Tue Apr 27 20:01:40 CEST 2004
> Subject: Re: [gmx-developers] insertion-deletion
> From: David van der Spoel <spoel at xray.bmc.uu.se>
> To: gmx-developers at gromacs.org
> Date: Fri, 23 Apr 2004 08:47:04 +0200
> Reply-To: gmx-developers at gromacs.org
>
> On Thu, 2004-04-22 at 22:36, Jason DeJoannis wrote:
> > Dear All,
> >
> > Consider a lennard-jones fluid. I want to perform insertions
> > and deletions provided
> >
> > 1 < n < n0
> >
> > where n is the number of atoms
> > n0 is the number of atoms in the starting config
> >
> >
> > All I do is change top->atoms.nr and all the other measures of
> > the number of atoms (i.e. inside mdatoms,top->atoms,top->blocks,nsb).
> > Directly afterwards a new neighbor search is performed.
> >
> > Unfortunately after a dozen or so steps, one or more of the forces
> > becomes "nan". Right now I am running in serial mode with 10 atoms to
> > keep things simple.
> >
> > Any idea what is killing my forces?
> How about the lengths of the force arrays, coordinate arrays and son on?
>
That is the point of keeping the number of particles less than or equal
to the starting config. The arrays have a fixed length of n0. At first
I tried using srenew(array,newsize) to expand the arrays but it proved
difficult to find everything that needs expansion.
It seems there is something wrong in the neighbor search. For example,
sometimes atoms show up on the lists even though they are not supposed
to exist any more. Maybe the search is still including the deleted
particles.
It is difficult to find all of the atom-number entries. Here is
what I do for deleting an atom:
mdatoms->nr--;
top->atoms.nr--;
top->atoms.nres--;
top->blocks[ebCGS].nr--;
top->blocks[ebCGS].nra--;
top->blocks[ebCGS].multinr[0]--;
top->blocks[ebMOLS].nr--;
top->blocks[ebMOLS].nra--;
top->blocks[ebMOLS].multinr[0]--;
top->blocks[ebSBLOCKS].nr--;
top->blocks[ebSBLOCKS].nra--;
top->blocks[ebSBLOCKS].multinr[0]--;
nsb->homenr[0]--;
nsb->cgtotal--;
nsb->natoms--;
fr->hcg--;
Justin mentioned writing a general MC integrator a couple of
years ago. Is there any progress on this?
---
Jason de Joannis, Ph.D.
Chemistry Department, Emory University
1515 Pierce Dr. NE, Atlanta, GA 30322
Phone: (404) 712-2983
Email: jdejoan at emory.edu
http://userwww.service.emory.edu/~jdejoan
More information about the gromacs.org_gmx-developers
mailing list