Re: [AMBER] problems with paramfit

From: Marek Maly <marek.maly.ujep.cz>
Date: Tue, 29 Jul 2014 03:25:16 +0200

Hi Robin,

indeed that I used the the actual paramfit including patch7
to create the parameters.in and so the problem which I discussed
is related to the latest format of this file having these strings:

#### BOND REQ KR ####
#### ANGLE KT THEQ ####
#### DIHEDRAL TERM KP NP PHASE ####

as the "signals" to start interpret next line as the useful data
and where # alone is the "STOP" signal (in case of BOND and ANGLE section).


     Best wishes,

        Marek


Dne Tue, 29 Jul 2014 02:52:14 +0200 Robin Betz <rbetz.ucsd.edu> napsal/-a:

> Hi Marek,
>
> As stated in the update.7 bugfix info, there have been some improvements
> to
> the parameters to fit file format that result in old files being
> incompatible. Re-generate this file using the SET_PARAMS runtype and it
> should work again. Rest assured all versions of paramfit undergo thorough
> testing for all typical use cases.
>
> A tutorial on paramfit is being prepared and will be released very soon,
> which will provide a full explanation of all job control options and more
> importantly a discussion of how to evaluate the resulting parameters for
> quality.
>
> Hope this helps,
> Robin
>
>
> On Mon, Jul 28, 2014 at 1:51 PM, Marek Maly <marek.maly.ujep.cz> wrote:
>
>> Hi Robin,
>>
>> thanks for the complex info. I have also one more for you :))
>>
>> After successful applying of the patch 7, the paramfit
>> was not able to read angle parameters from the file where
>> all the parameters for fitting was previously saved (i.e.
>> parameters.in).
>>
>> SOLUTION:
>>
>> In "file_io.c" in function "read_parameter_file_v2" (cca lines 201-206)
>>
>> change:
>>
>> }
>> } while (strncmp(line, "#### ANGL", 9)!=0);
>>
>> // Read in the angles
>> while (strncmp(line,"#",1)!=0) {
>> fgets(line,127,fptr);
>>
>> TO
>>
>> }
>> } while (strncmp(line, "#### ANGL", 9)!=0);
>>
>> // Read in the angles
>> fgets(line,127,fptr);
>> while (strncmp(line,"#",1)!=0) {
>>
>> i.e. the first fgets in the "// Read in the angles" while cycle
>> has to be placed before while header (the same as in bond section)
>> otherwise,
>> the "// Read in the angles" cycle will be skipped because in "line"
>> variable
>> is "#### ANGLE KT THEQ ####" at the moment when the
>> "strncmp(line,"#",1)!=0" condition is firstly checked in the "// Read in
>> the angles" cycle and so this condition has on the very
>> start of the angle part value FALSE.
>>
>> Anyway would be a good idea to test functionality of any updated part of
>> the software before
>> it is released :))
>>
>> Regarding SEARCH_SPACE I checked the genetic algorithm part and I
>> started
>> to have doubts
>> that the given implementation could guarantee the final results within
>> the
>> SEARCH_SPACE relative range around the initial value. So thanks for the
>> confirmation.
>> Anyway something like your actual explanation should be placed in the
>> Amber14 manual because
>> the actual comments related to SEARCH_SPACE clearly suggest in my
>> opinion,
>> that the final
>> values should be in SEARCH_SPACE relative distance from the initial
>> values
>> independently
>> from the quality of the initial guesses.
>>
>> Thanks again,
>>
>> Best wishes,
>>
>> Marek
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Dne Mon, 28 Jul 2014 22:12:58 +0200 Robin Betz <rbetz.ucsd.edu>
>> napsal/-a:
>>
>>
>> Hi Marek,
>>>
>>> Thanks for your helpful bug report. I appreciate the time you took to
>>> look
>>> at the code to figure out the source of each error. I've addressed
>>> each of
>>> your bugs as follows:
>>>
>>> 1. Fixed in update.7.
>>>
>>> 2. Fixed in the development tree. A workaround is just to pass the -c
>>> and
>>> -p parameters in the case of only one input topology.
>>>
>>> 3. There were two bugs causing the issue you saw. Both are now fixed in
>>> the
>>> development tree.
>>>
>>> First, if a job control file is passed to paramfit without any
>>> topology
>>> files (the -i option only), the program will segfault for the reasons
>>> you
>>> identified. This set of inputs doesn't make sense though, as if a job
>>> control file is inputted there is no need for the wizard, but there is
>>> no
>>> topology file to act upon. In this case paramfit will now output an
>>> error
>>> about inconsistent command line options.
>>>
>>> Secondly, if a job control file and a parameter file are passed to
>>> paramfit
>>> (the -i and -p/-pf options), and the NSTRUCTURES=<number> line is
>>> present
>>> in the job control file, the program will segfault. This is because the
>>> number of structures is a property of the coordinate structure, which
>>> has
>>> not been allocated due to the absence of the -c/-cf command line
>>> options.
>>> Paramfit will now output an error if this scenario is present. This is
>>> also
>>> why it might have worked with your input files but not with the wizard
>>> ones, as the NSTRUCTURES line is always present in the files that the
>>> wizard writes.
>>>
>>> A workaround for this is to always pass a topology and coordinate file
>>> to
>>> paramfit.
>>>
>>> 4. This is normal behavior. To clarify, the SEARCH_SPACE parameter only
>>> affects the starting population of the genetic algorithm, and the final
>>> parameters are free to be outside this range. The parameters in the
>>> population can drift from the starting range by either the mutation
>>> operation or the simplex refinement. If you're repeatedly seeing
>>> convergence to other values there is most likely a very large
>>> difference
>>> in
>>> fitness between your starting search area and where the algorithm ends
>>> up.
>>> You can encourage the algorithm to remain in certain areas of parameter
>>> space by reducing the mutation rate (MUTATION_RATE=<0-1.0>) and
>>> removing
>>> the simplex refinements altogether (GENERATIONS_TO_SIMPLEX=0).
>>>
>>> I will let you know when the next official patch is released.
>>> Thanks again,
>>>
>>> Robin
>>>
>>>
>>> On Sun, Jul 27, 2014 at 9:12 AM, Marek Maly <marek.maly.ujep.cz> wrote:
>>>
>>> Hi Robin and all,
>>>>
>>>> I analyzed some of the actual paramfit problems (the most of all
>>>> I mentioned before except the SEARCH_SPACE parameter problem).
>>>> I am also suggesting some solutions for those who would like
>>>> to use it before the proper patch will be released.
>>>>
>>>> Solved/analyzed problems:
>>>>
>>>> #1
>>>> Ignoration of the K value if this should be read in from the "Job
>>>> Control
>>>> File" (JCF)
>>>> or from the prmtop_list file.
>>>>
>>>> SOLUTION:
>>>>
>>>> in file "process_prmtop.c" , in line : 397 (func.
>>>> process_single_prmtop)
>>>> comment (//) or delete "parm_data->K=0.".
>>>> There is too late for default setting of this parameter at this place.
>>>>
>>>> #2
>>>> Paramfit crashes when one uses prmtop_list and mdcrd_list approach
>>>> (i.e. paramfit -i Job_Control.in -pf prmtop_list -cf mdcrd_list -v
>>>> MEDIUM
>>>> --random-seed seed )
>>>> in the case that there is just one prmtop/mdcrd file (just one
>>>> molecule).
>>>>
>>>> This should not happen even if in such a case one may use recommended
>>>> way
>>>> for one molecule fit,
>>>> without using prmtop_list and mdcrd_list.
>>>> (i.e. paramfit -i Job_Control.in -p prmtop -c mdcrd -q QM_data.dat )
>>>>
>>>> SOLUTION:
>>>>
>>>> in file "read_mdcrd.c", in line : 35 (func. read_mdcrds)
>>>> change "if (global_options->num_prmtops>1)" to "if
>>>> (global_options->num_prmtops>=1)"
>>>>
>>>> #3
>>>> Paramfit crashes when one strts it without any parameters i.e. in
>>>> "wizard
>>>> mode" in
>>>> the moment when K value is read in.
>>>>
>>>> REASON
>>>>
>>>> That critical moment corresponds to the line : 181 (func.
>>>> job_control_wizard) where
>>>> is written command: "parm_datas[0].K=get_float();"
>>>> Unfortunately the pointer "parm_datas" has at this moment value NULL
>>>> or
>>>> (nil) (depend on compiler)
>>>> which probably means that at this moment this pointer still dos not
>>>> represent any parm_struct structure (no proper memmory allocation was
>>>> done
>>>> yet using parm_datas pointer).
>>>>
>>>> In this context is strange to me that the same problem does not
>>>> occure in
>>>> case when JCF is already created by hand (not by wizard).
>>>>
>>>> I would assume that the command "parm_data[0].K=double_temp1;" (line :
>>>> 366
>>>> in process_job_control_setting.c) will also cause the program crash
>>>> here
>>>> because it seems, that the parm_datas is used for the allocation of
>>>> the
>>>> parm_struct structures array in function "read_prmtops" which is in
>>>> the
>>>> main function (in parameter_optimiser.c) called after the calls of
>>>> "read_job_control_file" OR "job_control_wizard".
>>>>
>>>> #4
>>>> Parameter SEARCH_SPACE does not seem to be fully functional (this
>>>> problem
>>>> I had also in the previous versions of paramfit). At least in the
>>>> case of
>>>> the force constants there is some problem, otherwise it should not be
>>>> possible that I get for one my angle force constant the final value
>>>> -5.2256 if the starting value was 58.2894 and the SEARCH_SPACE
>>>> parameter
>>>> was set to value 0.5.
>>>>
>>>> In such a case I would expected that the final value of this force
>>>> constant will be in the range from
>>>> 58.2894 - 0.5*58.2894 to 58.2894 + 0.5*58.2894. Clearly the actual
>>>> final
>>>> value -5.2256 does not belong to this interval. I verified that there
>>>> is
>>>> not a problem with reading SEARCH_SPACE parameter from the JCF as the
>>>> right
>>>> value is clearly written in the screen. Anyway I just to be sure
>>>> rewrote
>>>> this value in "defaults.c" but this did not helped so the problem is
>>>> clearly in the implementation/usage of this parameter.
>>>>
>>>> This problem is actual for GENETIC but also for SIMPLEX calculation
>>>> mode.
>>>>
>>>> All the above described problems are related to the actual version of
>>>> Amber Tools which are
>>>> patched up to the patch 6.
>>>>
>>>> Patch 7 from the 17 July, where also some paramfit problems were
>>>> addressed
>>>> was
>>>> not applied because it was not possible. I describe this in the
>>>> separate
>>>> email.
>>>> But anyway above described problems are probably not fixed in p.7 as
>>>> Robin
>>>> wrote (25 July) that they will be fixed in some next patch.
>>>>
>>>> Best wishes,
>>>>
>>>>
>>>> Marek
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Dne Fri, 25 Jul 2014 17:33:37 +0200 Robin Betz <rbetz.ucsd.edu>
>>>> napsal/-a:
>>>>
>>>> Hi Marek,
>>>>
>>>>>
>>>>> This is a known bug with paramfit and will be fixed in the next few
>>>>> days.
>>>>> I
>>>>> will let you know when the update is released.
>>>>>
>>>>> Regards,
>>>>> Robin Betz
>>>>> On Jul 24, 2014 3:05 PM, "Marek Maly" <marek.maly.ujep.cz> wrote:
>>>>>
>>>>> Dear all,
>>>>>
>>>>>>
>>>>>> I just wanted to do some "revision" ff parameters fitting using the
>>>>>> paramfit from the
>>>>>> actual Amber14. When I tried to use this actual paramfit version for
>>>>>> FIT
>>>>>> work,
>>>>>> I realized that the value of the constant K clearly written in the
>>>>>> control
>>>>>> file
>>>>>> (K=-196.792733) was not read in and instead default value of K (i.e.
>>>>>> 0.0000) is
>>>>>> used and written in the screen.
>>>>>> So I decided to use recommended wizard to create control file
>>>>>> (however
>>>>>> in
>>>>>> case of
>>>>>> the older paramfit versions I never had problem with control file
>>>>>> created
>>>>>> by hand).
>>>>>>
>>>>>> Unfortunately the wizard failed exactly in the step where it had to
>>>>>> read
>>>>>> K constant value,
>>>>>> please see below. I verified this behavior on two different HW
>>>>>> platforms.
>>>>>>
>>>>>> So it seems that the actual paramfit version (at least the my OpenMP
>>>>>> version) has some problems
>>>>>> in reading of the floating point numbers (from the file and as well
>>>>>> from
>>>>>> the screen (wizard)).
>>>>>>
>>>>>> I tried here to change the number of cores (using OMP_NUM_THREADS)
>>>>>> from 8
>>>>>> to 1 (for the wizard work) but this did not helped. I would be very
>>>>>> grateful for any useful suggestions which could help me to
>>>>>> solve this problem.
>>>>>>
>>>>>> I am using Amber14 with the patches up to 3 (in case of AT up to 6).
>>>>>> My OS is CentOS release 6.5 (2.6.32-431.el6.x86_64), I used gnu
>>>>>> compilers
>>>>>> to compile Amber14 ( gcc version 4.4.7 20120313 (Red Hat 4.4.7-4)
>>>>>> (GCC)
>>>>>> ).
>>>>>> I did not recognize any other problems (e.g. durin MD simulation)
>>>>>> and
>>>>>> all
>>>>>> the
>>>>>> tests which are recommended part of the Amber14 installation
>>>>>> proceeded
>>>>>> successfully.
>>>>>>
>>>>>> Thank you in advance for the help,
>>>>>>
>>>>>> Best wishes,
>>>>>>
>>>>>> Marek
>>>>>>
>>>>>>
>>>>>> ! Setting verbosity to medium.
>>>>>>
>>>>>>
>>>>>> *****************************************************
>>>>>> * AMBER Bond Angle and Dihedral Parameter
>>>>>> Optimiser *
>>>>>> *
>>>>>> *
>>>>>> *
>>>>>> v3.0.0 *
>>>>>> *
>>>>>> *
>>>>>> * Written
>>>>>> by: *
>>>>>> * Robin Betz
>>>>>> (2011) *
>>>>>> * Ross Walker
>>>>>> (2004) *
>>>>>> * The Walker Molecular Dynamics
>>>>>> Lab *
>>>>>> * University of California, San
>>>>>> Diego *
>>>>>> * La Jolla, California,
>>>>>> 92092 *
>>>>>> *
>>>>>> USA *
>>>>>> *****************************************************
>>>>>>
>>>>>>
>>>>>> ************************************************************
>>>>>> *************************
>>>>>> Execution started at:
>>>>>> | Thu Jul 24 23:31:16 2014
>>>>>>
>>>>>> |
>>>>>> | Running OpenMP version of code using 1 processors
>>>>>>
>>>>>> | Random seed = 1406237476
>>>>>> PARAMFIT SETTINGS WIZARD
>>>>>> ------------------------
>>>>>>
>>>>>> Enter a job control filename to save settings as, or hit enter
>>>>>> > control.in
>>>>>> Saving job control settings as "control.in"
>>>>>>
>>>>>> How many input structures do you have?
>>>>>> 100
>>>>>>
>>>>>> Which format is your coordinate file in?
>>>>>> 1) Trajectory (.mdcrd,.inpcrd)
>>>>>> 2) Restart (.rst, .restart)
>>>>>> 1
>>>>>>
>>>>>> What type of job do you want to run?
>>>>>> 1) Create input files for quantum program
>>>>>> 2) Set which parameters to fit
>>>>>> 3) Conduct a fit
>>>>>> 3
>>>>>>
>>>>>> Which parameters would you like to fit?
>>>>>> 1) Defaults (see manual)
>>>>>> 2) Load list from file
>>>>>> 3) K only
>>>>>> > 2
>>>>>> Enter file name:
>>>>>> > parameters.in
>>>>>> Enter the initial value for K:
>>>>>> > -196.792733
>>>>>> Error: signal 11:
>>>>>> /opt/amber14/bin/paramfit[0x4090d5]
>>>>>> /lib64/libc.so.6(+0x329a0)[0x7f83cdff79a0]
>>>>>> /opt/amber14/bin/paramfit[0x421bf9]
>>>>>> /opt/amber14/bin/paramfit[0x40a561]
>>>>>> /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f83cdfe3d1d]
>>>>>> /opt/amber14/bin/paramfit[0x401739]
>>>>>> [mara.node25 04_FIT]$
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
>>>>>> http://www.opera.com/mail/
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>> --
>>>> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
>>>> http://www.opera.com/mail/
>>>>
>>>> _______________________________________________
>>> AMBER mailing list
>>> AMBER.ambermd.org
>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>
>>
>>
>> --
>> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
>> http://www.opera.com/mail/
>>
>
>
>
> __________ Informace od ESET NOD32 Antivirus, verze databaze 10167
> (20140728) __________
>
> Tuto zpravu proveril ESET NOD32 Antivirus.
>
> http://www.eset.cz
>


-- 
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 28 2014 - 19:00:02 PDT
Custom Search