Re: amber-developers: GB/LES GB1 diffcoords FP exception on Sun

From: David A. Case <case.scripps.edu>
Date: Mon, 27 Mar 2006 16:41:05 -0700

On Mon, Mar 27, 2006, John Mongan wrote:
>
> #ifdef LES
> sdfacles = sqrt( 4.d0*gammai*boltz2*temp0les/dtx )
> #endif

Carlos:

here's what I tentatively have in mind for a fix to runmd.f:

quine% cvs diff -u runmd.f
Index: runmd.f
===================================================================
RCS file: /thr/loyd/case/cvsroot/amber9/src/sander/runmd.f,v
retrieving revision 8.135
diff -u -r8.135 runmd.f
--- runmd.f 22 Mar 2006 23:29:00 -0000 8.135
+++ runmd.f 27 Mar 2006 23:32:59 -0000
.. -432,7 +432,11 ..
    c_ave = 1.d0+gammai*dt5
    sdfac = sqrt( 4.d0*gammai*boltz2*temp0/dtx )
 #ifdef LES
- sdfacles = sqrt( 4.d0*gammai*boltz2*temp0les/dtx )
+ if( temp0les < 0.d0 ) then
+ sdfacles = sqrt( 4.d0*gammai*boltz2*temp0/dtx )
+ else
+ sdfacles = sqrt( 4.d0*gammai*boltz2*temp0les/dtx )
+ endif
 #endif
     if(tlangv .and. ifbox==0) &
        call get_position(nr,x,sysx,sysy,sysz,sysrange,0)


This follows the logic of otherplaces in runmd() where temp0les is checked
for negative values. It passes the tests on my machine.

The test cases all seem to use ntt=3, so that (bad) value of "sdfacles"
created with the old code doesn't matter.

What do you think? Is there something else I should be keeping in mind?

...thx...dac
Received on Wed Apr 05 2006 - 23:49:34 PDT
Custom Search