Re: [AMBER] Converting %FLAG XVV array found in .xvv file into a readable format similar to other .*vv files

From: Jason Swails <jason.swails.gmail.com>
Date: Thu, 20 Jan 2022 09:23:31 -0500

ParmEd has an Amber file parser that parses these kinds of files and loads
the flag data into a dict mapping strings (the flag name) to arrays of the
raw data. You can use it in a script like so:

>>> import parmed as pmd
>>> xvv = pmd.load_file('spc-kh.xvv')
>>> xvv
<parmed.amber.amberformat.AmberFormat object at 0x7f195770adf0>
>>> xvv.flag_list
['POINTERS', 'THERMO', 'THERMO_DT', 'ATOM_NAME', 'MTV', 'NVSP', 'MASS',
'RHOV', 'RHOSP', 'QV', 'QSPV', 'EPSV', 'RMIN2V', 'DELHV0', 'DELHV0_DT',
'COORD', 'XVV', 'XVV_DT']
>>> xvv.parm_data["XVV"][:10]
[0.06466321214125481, 0.06466000915586434, 0.06465067465398544,
0.06463556996418762, 0.06461505641504028, 0.0645894974239124,
0.06455924954035608, 0.06452466690815684, 0.06448609749148604,
0.06444388501121923]

Just as a note, however, that you may have to massage some of the arrays to
trim off trailing "None"s, since the AmberFormat object only really knows
how many elements to truncate each array to for topology files. For XVV
(and other %FLAG-type files), ParmEd reads lines and seems to insert "None"
for missing entries in a partially-filled line. But it should at least
help provide a head start on writing a script to convert the data for your
needs.

Hope this helps,
Jason


On Wed, Jan 19, 2022 at 7:27 AM Daniel Fowles <daniel.fowles.strath.ac.uk>
wrote:

> Dear all,
>
> I’m trying to examine the solvent susceptibility data found within the
> .xvv file for a solvent, however it’s the only .*vv file that doesn’t
> present its data in a readable format for each pair. Does anyone know, or
> have suggestions, of how to convert the %FLAG XVV array found within the
> .xvv file for a solvent?
>
> Thanks
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>


-- 
Jason M. Swails
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jan 20 2022 - 06:30:02 PST
Custom Search