Re: [AMBER] How to implement a new energy function in AMBER

From: Xin Geng <xingeng2011.berkeley.edu>
Date: Mon, 14 May 2012 18:01:40 -0700

On Mon, 14 May 2012 17:10:10 -0700, Jason Swails <jason.swails.gmail.com>
wrote:
> On Mon, May 14, 2012 at 3:55 PM, Xin Geng <xingeng2011.berkeley.edu>
wrote:
>
>>
>>
>> Dear all,
>>
>> I want to implement a solvation energy function
>> HPMF(Hydrophobic Potential of Mean Force[1])in Amber in order to use
>> calculate thermodynamics integration of Amber+GB+HPMF. I wrote a
program
>> to
>> implement HPMF. I enclosed my program to this email.
>>
>> However I have
>> trouble in compiling my program with the Amber package. So, I want to
ask
>> what modification I should to do with Amber Package to call the
>> subroutines
>> of my program.
>>
>
>>From what I can tell, you wrote a module. A couple comments. Include
the
> dprec.h header (you seem to have done this already, but look at other
> source files to see how this header is included -- i.e. #include
> "../include/dprec.fh")
>
> This header defines a macro _REAL_ which you should use to define all
> floating point data types (don't use real). This really only works with
> double precision at this point. I think this is safer than using "real"
> and "real*8" like you do...
>
> Afterwards, make sure your source code file is in $AMBERHOME/src/sander,
> then run the command "make depend" in order to update the dependencies.
>
> Other than these comments, I think you would need to provide details
about
> exactly what you did and what error messages you got.
>
> HTH,
> Jason
>
> P.S. -- you should also tell us what version of Amber you are trying to
add
> this to, since the exact instructions depend on that version.

Hi Jason,

Thanks for your help!

I copy my file into $AMBERHOME/src/sander and include some header by
referring icosasurf.f, such as assert.h, dprec.h and memory.h.
I try to add this file to Amber10.
I'll show you what I've done as follows:
(1) Add "use genhpmf, only : init_hpmf" into subroutine force (Line 22 of
force.f) and "call init_hpmf(x,ix,ih,natom,nbona)" into subroutine
force(Line 921 of force.f)
(2) Add " use genhpmf !for HPMF calculation" into subroutine egb(Line 172
of egb.f) and "if" from line 1614 of egb.f
        
         if (gbsa == 3) then
             
             !-----calculate hpmf instead of sasa
             !return value is esurf, teh file is ehpmf.f
             
             totsasa = 0
             esurf = ehpmf()
         end if !(gbsa == 3)

When I use "make serial", the following errors show up:

gfortran -c -O3 -fno-range-check -fno-second-underscore -ffree-form -o
egb.o _egb.f
 In file _egb.f:243

   use genhpmf !for HPMF calculation
                                   1
Fatal Error: Can't open module file 'genhpmf.mod' for reading at (1): No
such file or directory
make[1]: *** [egb.o] Error 1
make[1]: Leaving directory `/home1/xingeng/HPMF/Amber10/src/sander'
make: *** [serial] Error 2

Thanks,

Xin
 


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 14 2012 - 18:30:04 PDT
Custom Search