[gmx-developers] Code snippits for flat-bottomed harmonic potentials in gromacs 4.0.4
Chris Neale
chris.neale at utoronto.ca
Wed Apr 29 01:39:44 CEST 2009
Hello,
I have recently introduced simple flat-bottom potentials to the pull
code in my local version of gromacs 4.0.4. This could be used for
umbrella sampling or to create a cap of water around a protein in
vacuum. It appears to work for me, but then again I don't do much
gromacs source code modification.
Not being sure where to post this, I'm sticking it on this list.
$diff MODIFIED/include/types/inputrec.h ORIGINAL/include/types/inputrec.h
104d103
< real flat; /* Extension of the flat bottom potential
around init (only for distance pulling) */
$diff MODIFIED/src/gmxlib/tpxio.c ORIGINAL/src/gmxlib/tpxio.c
212d211
< do_real(pgrp->flat);
$diff MODIFIED/src/gmxlib/txtdump.c ORIGINAL/src/gmxlib/txtdump.c
487d486
< PR("flat",pg->flat);
$diff MODIFIED/src/kernel/readpull.c ORIGINAL/src/kernel/readpull.c
175,176d174
< sprintf(buf,"pull_flat%d",i);
< RTYPE(buf, pgrp->flat, 0.0);
$diff MODIFIED/src/mdlib/pull.c ORIGINAL/src/mdlib/pull.c
623d622
< double dvb;
640,648d638
< /* fprintf(stderr,"INITIAL
dev[0]=%f\tpgrp->flat=%f\t",dev[0],pgrp->flat); */
< if(dev[0]>pgrp->flat){
< dev[0]-=pgrp->flat;
< }else if(dev[0]<-pgrp->flat){
< dev[0]+=pgrp->flat;
< }else{
< dev[0]=0.0;
< }
< /* fprintf(stderr,"NOW dev[0]=%f\n",dev[0]); */
More information about the gromacs.org_gmx-developers
mailing list