[gmx-users] trjconv ndec not working
Justin Lemkul
jalemkul at vt.edu
Wed Apr 18 15:46:11 CEST 2018
On 4/18/18 8:57 AM, Dawid das wrote:
> The quick and dirty solution is that I write gro and g96 and copy
> coordinates from the latter to the former, but I'd rather
> have more elaborate solution.
.gro files are fixed-format, and in current GROMACS versions it is not
possible to write more decimal places than the file format specification
allows. GROMACS can read .gro files with variable precision for
backwards-compatibility, but for consistency (especially with external
programs that also read .gro), it is not possible to get variable
precision output to .gro from any GROMACS program.
If you need greater precision, just use .g96 directly rather than
copying back to a .gro file.
-Justin
> 2018-04-18 14:53 GMT+02:00 Dawid das <addiw7 at googlemail.com>:
>
>> Dear All,
>>
>> I have similar issue. I have created xtc file with precision of 1.0e-6 nm
>> and I want my gro file to have the same precision,
>> and I get this at the end of trjconv
>>
>> Reading frame 0 time 3.000
>> Precision of npt-md-prod.xtc is 1e-06 (nm)
>>
>> Setting output precision to 1e-06 (nm)
>> Last frame 0 time 3.000
>>
>> So isn't there really a way to overcome that? For instance recompile
>> Gromacs?
>>
>> Best wishes,
>> Dawid Grabarek
>>
>> 2018-04-17 18:48 GMT+02:00 Eric Smoll <ericsmoll at gmail.com>:
>>
>>> Paul and Mark,
>>>
>>> Thanks for the reply! Good to know I wasn't doing anything wrong.
>>>
>>> Best,
>>> Eric
>>>
>>> On Tue, Apr 17, 2018 at 10:08 AM, Mark Abraham <mark.j.abraham at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> What Paul said agrees with my memory, but I'd not found time to check
>>> that
>>>> yet. We should indeed fix the docs.
>>>>
>>>> Mark
>>>>
>>>> On Tue, Apr 17, 2018, 16:42 Paul Bauer <paul.bauer.q at gmail.com> wrote:
>>>>
>>>>> Hello Eric,
>>>>>
>>>>> I had a look at the code for writing gro files and it looks to me that
>>>>> it is only able to write three decimal places there.
>>>>> There is a comment in the code that mentions that writing other
>>>>> precisions has been removed.
>>>>> This means that we need to update the man page text to not be
>>> confusing.
>>>>> Cheers
>>>>>
>>>>> Paul
>>>>>
>>>>>
>>>>> On 2018-04-15 17:45, Eric Smoll wrote:
>>>>>> Hello Joe,
>>>>>>
>>>>>> Thanks for the reply. Sorry if I was not clear. I provide a gro file
>>>>> with high precision (7 decimal places). For some reason, the output
>>> gro
>>>>> always has three decimal places. The manual for trjconv suggests
>>> that
>>>> the
>>>>> output should have 7 decimal places.
>>>>>> Best,
>>>>>> Eric
>>>>>>
>>>>>>> On Apr 15, 2018, at 4:00 AM, Joe Jordan <e.jjordan12 at gmail.com>
>>>> wrote:
>>>>>>> Are you trying to write from an xtc file? If so, does it have the
>>>>> necessary
>>>>>>> precision?
>>>>>>>
>>>>>>>> On Sun, Apr 15, 2018 at 4:53 AM, Eric Smoll <ericsmoll at gmail.com>
>>>>> wrote:
>>>>>>>> Hello Gromacs Users,
>>>>>>>>
>>>>>>>> I am using Gromacs 2018.1.
>>>>>>>>
>>>>>>>> The manual page for gmx trjconv states the number of decimal
>>> places
>>>> in
>>>>> the
>>>>>>>> output of a gro file is taken from the number of decimal places in
>>>> the
>>>>>>>> input unless the ndec flag is set. The ndec flag can be used to
>>>>> increase
>>>>>>>> precision in the output.
>>>>>>>>
>>>>>>>> However, providing trjconv a gro file with increased coordinate
>>>>> precision
>>>>>>>> (7 decimal places) does not increase the precision of the output
>>> gro
>>>>> file.
>>>>>>>> Also, the ndec flag has no impact on the output precision.
>>>>>>>>
>>>>>>>> My input gro is written as follows:
>>>>>>>>
>>>>>>>> comment
>>>>>>>> 10
>>>>>>>> 1ABC C1 1 -0.1204914 -0.0759159 -0.0131147
>>>>>>>> ...etc.
>>>>>>>>
>>>>>>>> trconv does not complain about this file format and creates a
>>> normal,
>>>>> three
>>>>>>>> decimal
>>>>>>>> gro file as output.
>>>>>>>>
>>>>>>>> Has this feature been removed?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Eric
>>>>>>>> --
>>>>>>>> Gromacs Users mailing list
>>>>>>>>
>>>>>>>> * Please search the archive at http://www.gromacs.org/
>>>>>>>> Support/Mailing_Lists/GMX-Users_List before posting!
>>>>>>>>
>>>>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>>>>>
>>>>>>>> * For (un)subscribe requests visit
>>>>>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx
>>> -users
>>>> or
>>>>>>>> send a mail to gmx-users-request at gromacs.org.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Joe Jordan
>>>>>>> --
>>>>>>> Gromacs Users mailing list
>>>>>>>
>>>>>>> * Please search the archive at
>>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>>>>> posting!
>>>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>>>>
>>>>>>> * For (un)subscribe requests visit
>>>>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
>>> or
>>>>> send a mail to gmx-users-request at gromacs.org.
>>>>>
>>>>> --
>>>>> Gromacs Users mailing list
>>>>>
>>>>> * Please search the archive at
>>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>>>>> posting!
>>>>>
>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>>
>>>>> * For (un)subscribe requests visit
>>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>>> send a mail to gmx-users-request at gromacs.org.
>>>>>
>>>> --
>>>> Gromacs Users mailing list
>>>>
>>>> * Please search the archive at http://www.gromacs.org/
>>>> Support/Mailing_Lists/GMX-Users_List before posting!
>>>>
>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>
>>>> * For (un)subscribe requests visit
>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>> send a mail to gmx-users-request at gromacs.org.
>>>>
>>> --
>>> Gromacs Users mailing list
>>>
>>> * Please search the archive at http://www.gromacs.org/Support
>>> /Mailing_Lists/GMX-Users_List before posting!
>>>
>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>
>>> * For (un)subscribe requests visit
>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>> send a mail to gmx-users-request at gromacs.org.
>>>
>>
--
==================================================
Justin A. Lemkul, Ph.D.
Assistant Professor
Virginia Tech Department of Biochemistry
303 Engel Hall
340 West Campus Dr.
Blacksburg, VA 24061
jalemkul at vt.edu | (540) 231-3129
http://www.thelemkullab.com
==================================================
More information about the gromacs.org_gmx-users
mailing list