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

From: Xin Geng <xingeng2011.berkeley.edu>
Date: Wed, 16 May 2012 10:04:12 -0700

After I "make depend", lots of errors appear as follows:

In file _egb.f:436

   integer iac,ico,numex,natex,ntypes,natom,natbel,ncopy
                                    1
Error: Name 'ntypes' at (1) is an ambiguous reference to 'ntypes' from
current program unit
 In file _egb.f:639

         ico(*),numex(*),natex(*),fs(*),reff(natom), onereff(natom), &
                                                 1
Error: Name 'natom' at (1) is an ambiguous reference to 'natom' from
current program unit
 In file _egb.f:687

           charge(qmmm_nml%iqmatoms(qm_temp_count)) = &
          1
Error: Unclassifiable statement at (1)
 In file _egb.f:701

           charge(qmmm_nml%iqmatoms(qm_temp_count)) = &
          1
Error: Unclassifiable statement at (1)
 In file _egb.f:781

   maxi = natom
              1
Error: Name 'natom' at (1) is an ambiguous reference to 'natom' from
current program unit
 In file _egb.f:782

   if(natbel > 0) maxi = natbel
           1
Error: Name 'natbel' at (1) is an ambiguous reference to 'natbel' from
current program unit
 In file _egb.f:804

   sumdeijda(1:natom) = zero
                   1
Error: Name 'natom' at (1) is an ambiguous reference to 'natom' from
current program unit
 In file _egb.f:830

      iaci = ntypes * (iac(i) - 1)
                  1
Error: Name 'ntypes' at (1) is an ambiguous reference to 'ntypes' from
current program unit
 In file _egb.f:846

      do k=i+1,natom
                   1
Error: Name 'natom' at (1) is an ambiguous reference to 'natom' from
current program unit
..

....
....
....

Thanks again for your help!

Xin

On Mon, 14 May 2012 19:22:58 -0700, Jason Swails <jason.swails.gmail.com>
wrote:
> Did you do the "make depend" step I mentioned?
>
> --
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Candidate
> 352-392-4032
>
> On May 14, 2012, at 6:01 PM, Xin Geng <xingeng2011.berkeley.edu> wrote:
>
>> 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
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed May 16 2012 - 10:30:03 PDT
Custom Search