[gmx-users] converting cpt between single and double precision
Peter C. Lai
pcl at uab.edu
Wed Aug 17 19:07:33 CEST 2011
On 2011-08-16 08:16:52PM -0500, Mark Abraham wrote:
> On 17/08/2011 6:13 AM, Peter C. Lai wrote:
> > Is there a way to convert between single and double precision cpt files so
> > I can use double precision grompp on it to change some parameters but still
> > keep state information for continuity?
> >
> > Or can I just trjconv_d the last frame of the single precision trr and feed
> > that to grompp -t?
> >
> > (A machine I am using for preprocessing only has double precision tools and
> > it would be difficult to have both versions installed.)
>
> Any GROMACS tool can read any of its binary formats written in either
> precision, and write only in the precision with which the tool was compiled.
>
The problem is that when I use a double precision grompp and -t a single
precision .cpt, I get notices that it is discarding state data due to the
precision mismatch.
This is on 4.5.4:
Will read whole trajectory
Velocities generated: ignoring velocities in input trajectory
Precision mismatch for state entry box, code precision is double, file precision is float
Precision mismatch for state entry box-rel, code precision is double, file precision is float
Precision mismatch for state entry box-v, code precision is double, file precision is float
Precision mismatch for state entry pres_prev, code precision is double, file precision is float
Precision mismatch for state entry x, code precision is double, file precision is float
Precision mismatch for state entry v, code precision is double, file precision is float
the gmxdump of the resuling tpr confirms this:
boxv (3x3):
boxv[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
boxv[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
boxv[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
pres_prev (3x3):
pres_prev[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
pres_prev[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
pres_prev[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
svir_prev (3x3):
svir_prev[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
svir_prev[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
svir_prev[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
fvir_prev (3x3):
fvir_prev[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
fvir_prev[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
fvir_prev[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
nosehoover_xi: not available
Interestingly enough, box and box_rel are preserved, despite the messages
to the contrary, but of course, the majority of the reason to use .cpt
is to transfer the velocities and virial...
--
==================================================================
Peter C. Lai | University of Alabama-Birmingham
Programmer/Analyst | BEC 257
Genetics, Div. of Research | 1150 10th Avenue South
pcl at uab.edu | Birmingham AL 35294-4461
(205) 690-0808 |
==================================================================
More information about the gromacs.org_gmx-users
mailing list