diff --git a/ChangeLog b/ChangeLog index ed85011..75f57ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,15 @@ The rules for this file: * Note: rules were not applied before v0.6.0 ------------------------------------------------------------------------------ +??/??/???? ezavod + + * 0.8.0 + + Changes + + * Added support for legacy file version 1 (PR #22) + * Extended test coverage and code cleanup (PR #22) + 09/04/2023 IAlibay * 0.7.2 diff --git a/panedr/panedr/__init__.py b/panedr/panedr/__init__.py index a2a0d0e..94df723 100644 --- a/panedr/panedr/__init__.py +++ b/panedr/panedr/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- -from .panedr import edr_to_df, get_unit_dictionary import pbr.version +from .panedr import ENX_VERSION, edr_to_df, get_unit_dictionary __version__ = pbr.version.VersionInfo('panedr').release_string() del pbr + +# export `ENX_VERSION` for version checking in tests +# this is not useful for normal use +__all__ = ['ENX_VERSION', 'edr_to_df', 'get_unit_dictionary'] diff --git a/panedr/panedr/panedr.py b/panedr/panedr/panedr.py index 2ff9690..2eaf020 100644 --- a/panedr/panedr/panedr.py +++ b/panedr/panedr/panedr.py @@ -1,4 +1,4 @@ -#-*- coding:utf-8 -*- +# -*- coding:utf-8 -*- # Panedr -- a library to manipulate Gromacs EDR file in python # Copyright (C) 2016 Jonathan Barnoud # @@ -37,11 +37,11 @@ .. autofunction:: edr_to_df """ -from pyedr import read_edr, get_unit_dictionary import pandas as pd +from pyedr import ENX_VERSION, read_edr, get_unit_dictionary -__all__ = ['edr_to_df', 'get_unit_dictionary'] +__all__ = ['ENX_VERSION', 'edr_to_df', 'get_unit_dictionary'] def edr_to_df(path: str, verbose: bool = False) -> pd.DataFrame: diff --git a/panedr/panedr/tests/test_edr.py b/panedr/panedr/tests/test_edr.py index 36bcf23..da724ee 100644 --- a/panedr/panedr/tests/test_edr.py +++ b/panedr/panedr/tests/test_edr.py @@ -1,4 +1,4 @@ -#-*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Tests for panedr @@ -6,11 +6,8 @@ import sys import pytest -import contextlib import re -from io import StringIO from collections import namedtuple -from pathlib import Path import pickle import numpy as np @@ -18,11 +15,7 @@ import pandas import pyedr from pyedr.tests.test_edr import read_xvg, redirect_stderr -from pyedr.tests.datafiles import ( - EDR, EDR_XVG, EDR_UNITS, EDR_IRREG, EDR_IRREG_XVG, - EDR_IRREG_UNITS, EDR_DOUBLE, EDR_DOUBLE_XVG, EDR_DOUBLE_UNITS, - EDR_BLOCKS, EDR_BLOCKS_XVG, EDR_BLOCKS_UNITS -) +from pyedr.tests.datafiles import EDR, EDR_XVG, TESTFILE_PARAMS import panedr @@ -39,18 +32,28 @@ 'xvgfile']) +def check_version_warning(func, edrfile, version): + if version == panedr.ENX_VERSION: + return func(edrfile) + else: + with pytest.warns( + UserWarning, + match=f'enx file_version {version}, ' + f'implementation version {panedr.ENX_VERSION}' + ): + return func(edrfile) + + @pytest.fixture(scope='module', - params=[(EDR, EDR_XVG, EDR_UNITS), - (EDR_IRREG, EDR_IRREG_XVG, EDR_IRREG_UNITS), - (EDR_DOUBLE, EDR_DOUBLE_XVG, EDR_DOUBLE_UNITS), - (EDR_BLOCKS, EDR_BLOCKS_XVG, EDR_BLOCKS_UNITS), - (Path(EDR), EDR_XVG, EDR_UNITS), ]) + params=TESTFILE_PARAMS) def edr(request): - edrfile, xvgfile, unitfile = request.param - df = panedr.edr_to_df(edrfile) - df_units = panedr.get_unit_dictionary(edrfile) - edr_dict = pyedr.edr_to_dict(edrfile) - edr_units = pyedr.get_unit_dictionary(edrfile) + edrfile, xvgfile, unitfile, version = request.param + df = check_version_warning(panedr.edr_to_df, edrfile, version) + df_units = check_version_warning(panedr.get_unit_dictionary, + edrfile, version) + edr_dict = check_version_warning(pyedr.edr_to_dict, edrfile, version) + edr_units = check_version_warning(pyedr.get_unit_dictionary, + edrfile, version) with open(unitfile, "rb") as f: true_units = pickle.load(f) xvgdata, xvgnames, xvgprec = read_xvg(xvgfile) @@ -81,7 +84,8 @@ def test_columns(self, edr): """ columns = edr.df.columns.values if columns.shape[0] == edr.xvgcols.shape[0]: - print('These columns differ from the reference (displayed as read):') + print('These columns differ from the reference ' + '(displayed as read):') print(columns[edr.xvgcols != columns]) print('The corresponding names displayed as reference:') print(edr.xvgcols[edr.xvgcols != columns]) diff --git a/panedr/setup.py b/panedr/setup.py index 6c1c6cc..19d5894 100755 --- a/panedr/setup.py +++ b/panedr/setup.py @@ -4,4 +4,4 @@ setup_requires=['pbr'], pbr=True, include_package_data=True, -) + ) diff --git a/pyedr/pyedr/__init__.py b/pyedr/pyedr/__init__.py index 5445c4d..5b7f0b4 100644 --- a/pyedr/pyedr/__init__.py +++ b/pyedr/pyedr/__init__.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- -from .pyedr import edr_to_dict, read_edr, get_unit_dictionary +from .pyedr import ENX_VERSION, edr_to_dict, read_edr, get_unit_dictionary import pbr.version __version__ = pbr.version.VersionInfo('pyedr').release_string() del pbr + +# export `ENX_VERSION` for version checking in tests +# this is not useful for normal use +__all__ = ['ENX_VERSION', 'edr_to_dict', 'read_edr', 'get_unit_dictionary'] diff --git a/pyedr/pyedr/pyedr.py b/pyedr/pyedr/pyedr.py index e9b11a3..6a8ee68 100644 --- a/pyedr/pyedr/pyedr.py +++ b/pyedr/pyedr/pyedr.py @@ -1,4 +1,4 @@ -#-*- coding:utf-8 -*- +# -*- coding:utf-8 -*- # PyEDR -- a library to manipulate Gromacs EDR file in python # Copyright (C) 2022 Jonathan Barnoud # @@ -44,31 +44,29 @@ from mda_xdrlib import xdrlib import collections import warnings -import sys -import itertools +from pathlib import Path from tqdm import tqdm from typing import List, Tuple, Dict import numpy as np -#Index for the IDs of additional blocks in the energy file. -#Blocks can be added without sacrificing backward and forward -#compatibility of the energy files. - -#For backward compatibility, the order of these should not be changed. - - -(enxOR, # Time and ensemble averaged data for orientation restraints - enxORI, # Instantaneous data for orientation restraints - enxORT, # Order tensor(s) for orientation restraints - ensDISRE, # Distance restraint blocks - enxDHCOLL, # Data about the free energy blocks in this frame - enxDHHIST, # BAR histogram - enxDH, # BAR raw delta H data - enxNR # Total number of extra blocks in the current code, - # note that the enxio code can read files written by - # future code which contain more blocks. +# Index for the IDs of additional blocks in the energy file. +# Blocks can be added without sacrificing backward and forward +# compatibility of the energy files. + +# For backward compatibility, the order of these should not be changed. +( + enxOR, # Time and ensemble averaged data for orientation restraints + enxORI, # Instantaneous data for orientation restraints + enxORT, # Order tensor(s) for orientation restraints + enxDISRE, # Distance restraint blocks + enxDHCOLL, # Data about the free energy blocks in this frame + enxDHHIST, # BAR histogram + enxDH, # BAR raw delta H data + enxNR # Total number of extra blocks in the current code, + # note that the enxio code can read files written by + # future code which contain more blocks. ) = range(8) # xdr_datatype @@ -80,12 +78,12 @@ Enxnm = collections.namedtuple('Enxnm', 'name unit') ENX_VERSION = 5 -__all__ = ['edr_to_dict', 'read_edr', 'get_unit_dictionary'] +__all__ = ['ENX_VERSION', 'edr_to_dict', 'read_edr', 'get_unit_dictionary'] + class EDRFile(object): def __init__(self, path): - with open(path, 'rb') as infile: - content = infile.read() + content = Path(path).read_bytes() self.data = GMX_Unpacker(content) self.do_enxnms() @@ -100,7 +98,6 @@ def __iter__(self): yield self.frame def do_enxnms(self): - bReadFirstStep = False data = self.data magic = data.unpack_int() @@ -109,59 +106,73 @@ def do_enxnms(self): file_version = 1 nre = magic bOldFileOpen = True + self.bReadFirstStep = False + # For file version 1: store previous energies for convert_full_sums + self.ener_prev = [Energy() for _ in range(nre)] else: bOldFileOpen = False if magic != -55555: - raise ValueError("Energy names magic number mismatch, this is not a GROMACS edr file") + raise ValueError("Energy names magic number mismatch, " + "this is not a GROMACS edr file") file_version = ENX_VERSION file_version = data.unpack_int() if (file_version > ENX_VERSION): - raise ValueError('Reading file version {} with version {} implementation'.format(file_version, ENX_VERSION)) + raise ValueError(f'Reading file version {file_version} ' + f'with version {ENX_VERSION} implementation') nre = data.unpack_int() if file_version != ENX_VERSION: - warnings.warn('Note: enx file_version {}, implementation version {}'.format(file_version, ENX_VERSION)) + warnings.warn(f'Note: enx file_version {file_version}, ' + f'implementation version {ENX_VERSION}') nms = edr_strings(data, file_version, nre) self.file_version = file_version self.nre = nre self.nms = nms self.bOldFileOpen = bOldFileOpen - self.bReadFirstStep = False - def do_eheader(self, nre_test): + def do_eheader(self): data = self.data file_version = self.file_version fr = self.frame - magic = -7777777 - zero = 0 - dum = 0 - tempfix_nr = 0 ndisre = 0 startb = 0 - bWrongPrecision = False - bOK = True - - # We decide now whether we're single- or double-precision. Just peek - # ahead and see whether we find the magic number where it should. + # We decide now whether we're single- or double-precision. base_pos = data.get_position() - data.set_position(base_pos + 4) - data.gmx_double = not is_frame_magic(data) + if self.file_version == 1: + # Peek ahead check if nre matches value found in do_enxnms. + # skip first_real_to_check:double(8) and step:int(4) + data.set_position(base_pos + 12) + nre = data.unpack_int() + data.gmx_double = nre == self.nre + else: + # Just peek ahead and see whether we find the magic number + # where it should be. + # first_real_to_check:float(4) + data.set_position(base_pos + 4) + data.gmx_double = not is_frame_magic(data) data.set_position(base_pos) + # Set expected datatype of subblocks + dtreal = xdr_datatype_double if data.gmx_double else xdr_datatype_float + first_real_to_check = data.unpack_real() if first_real_to_check > -1e-10: # Assume we are reading an old format - file_version = 1 + if self.file_version != 1: + raise ValueError('Expected file version 1, ' + f'found version {self.file_version}') fr.t = first_real_to_check fr.step = data.unpack_int() else: if not is_frame_magic(data): - raise ValueError("Energy header magic number mismatch, this is not a GROMACS edr file") + raise ValueError("Energy header magic number mismatch, " + "this is not a GROMACS edr file") file_version = data.unpack_int() if file_version > ENX_VERSION: - raise ValueError('Reading file version {} with version {} implementation'.format(file_version, ENX_VERSION)) + raise ValueError(f'Reading file version {file_version} ' + f'with version {ENX_VERSION} implementation') fr.t = data.unpack_double() fr.step = data.unpack_hyper() fr.nsum = data.unpack_int() @@ -182,19 +193,17 @@ def do_eheader(self, nre_test): fr.nblock = data.unpack_int() assert fr.nblock >= 0 if ndisre != 0: - if file_version >= 4: - raise ValueError("Distance restraint blocks in old style in new style file") + # Distance restraint blocks of old style in new style file + # ndisre is only read from file for older than 4 versions + assert file_version < 4 fr.nblock += 1 - # Frames could have nre=0, so we can not rely only on the fr.nre check - if (nre_test >= 0 - and ((fr.nre > 0 and fr.nre != nre_test) - or fr.nre < 0 or ndisre < 0 or fr.nblock < 0)): - bWrongPrecision = True - return - # we now know what these should be, or we've already bailed out because - # of wrong precision + # we now know what these should be, + # or we've already bailed out because + # of wrong precision if file_version == 1 and (fr.t < 0 or fr.t > 1e20 or fr.step < 0): - raise ValueError("edr file with negative step number or unreasonable time (and without version number).") + raise ValueError("edr file with negative step number " + "or unreasonable time " + "(and without version number).") fr.add_blocks(fr.nblock) startb = 0 if ndisre > 0: @@ -215,7 +224,7 @@ def do_eheader(self, nre_test): nrint = data.unpack_int() fr.block[b].id = b - startb fr.block[b].sub[0].nr = nrint - fr.block[b].sub[0].typr = dtreal + fr.block[b].sub[0].type = dtreal else: fr.block[b].id = data.unpack_int() nsub = data.unpack_int() @@ -230,21 +239,32 @@ def do_eheader(self, nre_test): data.unpack_int() data.unpack_int() - # here, stuff about old versions + # The following data is used in convert_full_sums + # See do_eheader in enxio.cpp + if file_version == 1: + if not self.bReadFirstStep: + # Store the first step + self.bReadFirstStep = True + self.first_step = fr.step + self.step_prev = fr.step + self.nsum_prev = 0 + self.frame.nsum = fr.step - self.first_step + 1 + self.frame.nsteps = fr.step - self.step_prev + self.frame.dt = 0 def do_enx(self): data = self.data fr = self.frame + file_version = self.file_version - file_version = -1 framenr = 0 frametime = 0 try: - self.do_eheader(-1) - except ValueError: + self.do_eheader() + except ValueError as e: print("Last energy frame read {} time {:8.3f}".format(framenr - 1, frametime)) - raise RuntimeError() + raise RuntimeError("Failed reading header") from e framenr += 1 frametime = fr.t @@ -255,7 +275,7 @@ def do_enx(self): raise ValueError('Something went wrong') if fr.nre > fr.e_alloc: for i in range(fr.nre - fr.e_alloc): - fr.ener.append(Energy(0, 0, 0)) + fr.ener.append(Energy()) fr.e_alloc = fr.nre for i in range(fr.nre): fr.ener[i].e = data.unpack_real() @@ -266,7 +286,10 @@ def do_enx(self): # Old, unused real data.unpack_real() - # Old version stuff to add later + # Here we can not check for file_version==1, since one could have + # continued an old format simulation with a new one with mdrun -append. + if self.bOldFileOpen: + self.convert_full_sums() # Read the blocks ndo_readers = (ndo_int, ndo_float, ndo_double, @@ -276,14 +299,73 @@ def do_enx(self): try: sub.val = ndo_readers[sub.type](data, sub.nr) except IndexError: - raise ValueError("Reading unknown block data type: this file is corrupted or from the future") + raise ValueError("Reading unknown block data type: " + "this file is corrupted " + "or from the future") + + def convert_full_sums(self): + """Convert old energy sums + + Old energy files seem to store the sums + over all preceding energy frames. + Therefore one has to calculate the difference between frames. + See convert_full_sums in enxio.cpp + """ + fr = self.frame + first_step = self.first_step + nsum_prev = self.nsum_prev + step_prev = self.step_prev + ener_prev = self.ener_prev + + if fr.nsum > 0: + ne = ns = 0 + for ener in fr.ener: + if ener.e != 0: + ne += 1 + if ener.esum != 0: + ns += 1 + if ne > 0 and ns == 0: + # We do not have all energy sums + fr.nsum = 0 + + # Convert old full simulation sums to sums between energy frames + nstep_all = fr.step - first_step + 1 + if fr.nsum > 1 and fr.nsum == nstep_all and nsum_prev > 0: + # Set the new sum length: the frame step difference + fr.nsum = fr.step - step_prev + for i in range(fr.nre): + esum_all = fr.ener[i].esum + eav_all = fr.ener[i].eav + fr.ener[i].esum = esum_all - ener_prev[i].esum + fr.ener[i].eav = eav_all - ener_prev[i].eav \ + - (ener_prev[i].esum + / (nstep_all - fr.nsum) + - esum_all / nstep_all)**2 \ + * (nstep_all - fr.nsum) * nstep_all / fr.nsum + ener_prev[i].esum = esum_all + ener_prev[i].eav = eav_all + nsum_prev = nstep_all + elif fr.nsum > 0: + # Conversion is only done for version 1 files + # For those files, fr.nsum is always set + # to nstep_all while parsing the header + assert fr.nsum == nstep_all + nsum_prev = nstep_all + # Copy all sums to ener_prev + for i in range(fr.nre): + ener_prev[i].esum = fr.ener[i].esum + ener_prev[i].eav = fr.ener[i].eav + + self.nsum_prev = nsum_prev + self.step_prev = fr.step + self.ener_prev = ener_prev class Energy(object): __slot__ = ['e', 'eav', 'esum'] - def __init__(self, e=0, eav=0, esum=0): + def __init__(self): self.e = 0 self.eav = 0 self.esum = 0 @@ -293,17 +375,13 @@ def __repr__(self): self.e, self.eav, self.esum) + class SubBlock(object): def __init__(self): self.nr = 0 - self.type = xdr_datatype_float # should be double - # if compile in double + # should be double if compile in double + self.type = xdr_datatype_float self.val = [] - self.val_alloc = 0 - - def alloc(self): - self.val = [0 for _ in range(self.nr)] - self.vac_alloc = self.nr class Block(object): @@ -372,12 +450,13 @@ def ndo_double(data, n): def ndo_int64(data, n): """mimic of gmx_fio_ndo_int64 in gromacs""" - return [data.unpack_huge() for i in range(n)] + return [data.unpack_hyper() for i in range(n)] def ndo_char(data, n): """mimic of gmx_fio_ndo_char in gromacs""" - return [data.unpack_char() for i in range(n)] + # Note: chars are encoded as int(32) + return [data.unpack_int() for i in range(n)] def ndo_string(data, n): @@ -439,7 +518,7 @@ def read_edr(path: str, verbose: bool = False) -> read_edr_return_type: times: list[float] A list containing the time of each step/frame. """ - edr_file = EDRFile(str(path)) + edr_file = EDRFile(path) all_energies = [] all_names = [u'Time'] + [nm.name for nm in edr_file.nms] times = [] @@ -466,7 +545,7 @@ def get_unit_dictionary(path: str) -> Dict[str, str]: unit_dict: Dict[str, str] A dictionary mapping the term names to their units. """ - edr_file = EDRFile(str(path)) + edr_file = EDRFile(path) unit_dict = {'Time': "ps"} for nm in edr_file.nms: unit_dict[nm.name] = nm.unit diff --git a/pyedr/pyedr/tests/data/1.edr b/pyedr/pyedr/tests/data/1.edr new file mode 100644 index 0000000..3e1e058 Binary files /dev/null and b/pyedr/pyedr/tests/data/1.edr differ diff --git a/pyedr/pyedr/tests/data/1.xvg b/pyedr/pyedr/tests/data/1.xvg new file mode 100644 index 0000000..8af8adf --- /dev/null +++ b/pyedr/pyedr/tests/data/1.xvg @@ -0,0 +1,107 @@ +# This file was created Fri Jan 4 12:10:45 2019 +# Created by: +# :-) GROMACS - gmx energy, 2018.4 (-: +# +# Executable: /home/len/programs/gromacs/bin/gmx +# Data prefix: /home/len/programs/gromacs +# Working dir: /home/len/Dokumente/edr-rs/tests +# Command line: +# gmx energy -f /home/len/Dokumente/edr-rs/tests/regressiontests/simple/imp1/1.edr -o /home/len/Dokumente/edr-rs/tests/regressiontests/simple/imp1/1.xvg +# gmx energy is part of G R O M A C S: +# +# God Rules Over Mankind, Animals, Cosmos and Such +# +@ title "GROMACS Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure (bar)" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX (bar)" +@ s20 legend "Pres-XY (bar)" +@ s21 legend "Pres-XZ (bar)" +@ s22 legend "Pres-YX (bar)" +@ s23 legend "Pres-YY (bar)" +@ s24 legend "Pres-YZ (bar)" +@ s25 legend "Pres-ZX (bar)" +@ s26 legend "Pres-ZY (bar)" +@ s27 legend "Pres-ZZ (bar)" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247460 6.340124 5.023656 0.000000 0.000000 11.611239 23.976969 35.588207 274.642822 19.497919 1.011505 9.335083 -7.721649 9.334869 6.738525 5.942152 -7.721634 5.942261 -2.693365 33.679867 -29.047636 26.974384 -29.046974 -7.064007 -17.232933 26.974339 -17.233271 31.877897 40.573151 0.000000 0.000000 0.000000 274.642822 + 0.000200 0.327348 6.765538 5.246381 0.000000 0.000000 12.339266 23.249716 35.588982 266.312561 7.368472 12.192551 11.298340 -6.421509 11.298264 6.445557 6.492638 -6.421494 6.492722 -2.538576 -1.707423 -35.554718 23.379725 -35.554482 -7.371249 -19.025461 23.379677 -19.025721 31.184088 78.051392 0.000000 0.000000 0.000000 266.312561 + 0.000400 0.642608 7.180584 5.463950 0.000000 0.000000 13.287142 22.304394 35.591537 255.484406 -4.897171 23.384750 13.210754 -5.048370 13.210709 5.965202 7.018311 -5.048325 7.018448 -2.293465 -37.681614 -41.876396 19.339447 -41.876255 -7.025790 -20.627329 19.339306 -20.627752 30.015890 114.421280 0.000000 0.000000 0.000000 255.484406 + 0.000600 1.180128 7.580680 5.674901 0.000000 0.000000 14.435709 21.159878 35.595589 242.374634 -17.028730 34.376831 15.088623 -3.664551 15.088791 5.297346 7.536324 -3.664429 7.536332 -1.990040 -73.543076 -48.054462 15.054485 -48.054981 -6.023779 -22.094410 15.054108 -22.094437 28.480667 149.148865 0.000000 0.000000 0.000000 242.374619 + 0.000800 1.913714 7.961715 5.878065 0.000000 0.000000 15.753494 19.847660 35.601154 227.343887 -28.750504 44.949020 16.940674 -2.332123 16.940750 4.458012 8.058365 -2.332214 8.058308 -1.660591 -108.537712 -54.112766 10.737020 -54.112999 -4.408440 -23.470930 10.737302 -23.470755 26.694641 181.711487 0.000000 0.000000 0.000000 227.343887 + 0.001000 2.805694 8.319744 6.072139 0.000000 0.000000 17.197577 18.410265 35.607841 210.879318 -39.764702 54.881866 18.781494 -1.117798 18.781357 3.457230 8.601746 -1.117767 8.601692 -1.342140 -141.888153 -60.098274 6.624294 -60.097851 -2.201856 -24.823236 6.624199 -24.823071 24.795908 211.585785 0.000000 0.000000 0.000000 210.879333 + 0.001200 3.809224 8.651253 6.255620 0.000000 0.000000 18.716097 16.898926 35.615021 193.567780 -49.778091 63.966110 20.625793 -0.086273 20.626175 2.308334 9.182327 -0.086319 9.182220 -1.072083 -172.829819 -66.062622 2.956161 -66.063805 0.565782 -26.217096 2.956302 -26.216766 22.929768 238.286911 0.000000 0.000000 0.000000 193.567780 + 0.001400 4.871185 8.952931 6.427738 0.000000 0.000000 20.251854 15.370678 35.622532 176.062561 -58.497604 71.999451 22.484863 0.700073 22.485016 1.023575 9.816635 0.700226 9.816864 -0.887711 -200.607498 -72.050018 -0.028434 -72.050491 3.868958 -27.723177 -0.028906 -27.723885 21.245731 261.344421 0.000000 0.000000 0.000000 176.062561 + 0.001600 5.935040 9.222473 6.587539 0.000000 0.000000 21.745052 13.885091 35.630142 159.045975 -65.655487 78.791962 24.369629 1.181305 24.370010 -0.371307 10.517578 1.181305 10.517624 -0.825089 -224.499557 -78.105370 -2.094730 -78.106544 7.640818 -29.402630 -2.094731 -29.402773 19.892269 280.367371 0.000000 0.000000 0.000000 159.045975 + 0.001800 6.944663 9.457582 6.733941 0.000000 0.000000 23.136185 12.500837 35.637024 143.190125 -71.001114 84.179565 26.286560 1.308014 26.286575 -1.863739 11.299683 1.307938 11.299713 -0.917252 -243.867279 -84.260262 -3.040291 -84.260315 11.854570 -31.322012 -3.040056 -31.322105 19.009373 294.993164 0.000000 0.000000 0.000000 143.190125 + 0.002000 7.848146 9.656350 6.866272 0.000000 0.000000 24.370770 11.272213 35.642982 129.116928 -74.317719 88.022110 28.247864 1.029572 28.248077 -3.436493 12.175720 1.029594 12.175705 -1.197311 -258.156616 -90.563118 -2.661802 -90.563782 16.467331 -33.541489 -2.661873 -33.541447 18.736126 304.967224 0.000000 0.000000 0.000000 129.116928 + 0.002200 8.600093 9.817728 6.983732 0.000000 0.000000 25.401552 10.245968 35.647522 117.361855 -75.436623 90.203751 30.255188 0.312347 30.255539 -5.065460 13.153992 0.312698 13.154114 -1.690475 -266.906311 -97.027473 -0.814367 -97.028557 21.412243 -36.105259 -0.815452 -36.105637 19.184189 310.102692 0.000000 0.000000 0.000000 117.361855 + 0.002400 9.165542 9.940764 7.085782 0.000000 0.000000 26.192089 9.458582 35.650673 108.342789 -74.238159 90.650391 32.308655 -0.867310 32.309143 -6.736328 14.241852 -0.867226 14.241699 -2.416595 -269.807709 -103.658875 2.607579 -103.660385 26.649227 -39.051388 2.607320 -39.050915 20.444002 310.303741 0.000000 0.000000 0.000000 108.342789 + 0.002600 9.521039 10.025064 7.171894 0.000000 0.000000 26.717999 8.934158 35.652157 102.335808 -70.646584 89.307159 34.406616 -2.528046 34.406555 -8.426788 15.442352 -2.528305 15.442108 -3.392502 -266.639679 -110.453323 7.683643 -110.453140 32.109344 -42.400623 7.684444 -42.399868 22.590595 305.568054 0.000000 0.000000 0.000000 102.335808 + 0.002800 9.655821 10.070872 7.241901 0.000000 0.000000 26.968594 8.683086 35.651680 99.459915 -64.661621 86.169800 36.542664 -4.670013 36.542221 -10.116028 16.754517 -4.670242 16.754486 -4.624634 -257.368469 -117.387611 14.424395 -117.386246 37.723785 -46.156704 14.425102 -46.156612 25.659826 296.012268 0.000000 0.000000 0.000000 99.459915 + 0.003000 9.574196 10.078440 7.295510 0.000000 0.000000 26.948147 8.701544 35.649689 99.671341 -56.328480 81.263611 38.711060 -7.287659 38.710953 -11.787170 18.175201 -7.287567 18.175354 -6.115128 -242.083389 -124.436012 22.810312 -124.435684 43.431370 -50.311871 22.810030 -50.312344 29.666578 281.833344 0.000000 0.000000 0.000000 99.671341 + 0.003200 9.292592 10.048754 7.332428 0.000000 0.000000 26.673775 8.971861 35.645638 102.767670 -45.755859 74.653793 40.896484 -10.355225 40.896454 -13.424927 19.697845 -10.355057 19.698120 -7.856644 -221.027802 -131.538940 32.747139 -131.538849 49.171520 -54.843086 32.746620 -54.843937 34.588699 263.314819 0.000000 0.000000 0.000000 102.767670 + 0.003400 8.840415 9.983343 7.353034 0.000000 0.000000 26.176790 9.463769 35.640560 108.402206 -33.114471 66.439301 43.082703 -13.837738 43.082413 -15.008636 21.309723 -13.837959 21.309631 -9.833420 -194.577377 -138.630508 44.100811 -138.629608 54.863319 -59.703999 44.101498 -59.703716 40.370640 240.834229 0.000000 0.000000 0.000000 108.402206 + 0.003600 8.256898 9.883842 7.357148 0.000000 0.000000 25.497887 10.136385 35.634270 116.106644 -18.601219 56.742783 45.252258 -17.693695 45.252014 -16.528839 22.998413 -17.693649 22.998535 -12.027390 -163.204346 -145.638611 56.707497 -145.637848 60.457573 -64.845627 56.707355 -64.846008 46.943115 214.809753 0.000000 0.000000 0.000000 116.106644 + 0.003800 7.589183 9.752417 7.345165 0.000000 0.000000 24.686764 10.940847 35.627609 125.321312 -2.480017 45.724335 47.386292 -21.869080 47.386627 -17.966888 24.746033 -21.868774 24.745926 -14.410049 -127.514038 -152.485611 70.357407 -152.486649 65.874817 -70.199409 70.356461 -70.199081 54.199169 185.755829 0.000000 0.000000 0.000000 125.321312 + 0.004000 6.887959 9.591536 7.317671 0.000000 0.000000 23.797167 11.823427 35.620594 135.430771 14.970173 33.562897 49.464752 -26.303467 49.465027 -19.316132 26.534363 -26.303207 26.534409 -16.950027 -88.180420 -159.090515 84.816437 -159.091354 71.071892 -75.694221 84.815636 -75.694359 62.019047 154.194214 0.000000 0.000000 0.000000 135.430771 + 0.004200 6.206505 9.403782 7.274728 0.000000 0.000000 22.885014 12.728930 35.613945 145.802811 33.445950 20.458832 51.465088 -30.927704 51.465485 -20.574921 28.344238 -30.927460 28.344131 -19.610107 -45.946491 -165.366409 99.822090 -165.367630 76.021675 -81.255638 99.821335 -81.255310 70.262657 120.660141 0.000000 0.000000 0.000000 145.802811 + 0.004400 5.594263 9.192399 7.217096 0.000000 0.000000 22.003757 13.604132 35.607887 155.827759 52.625214 6.624207 53.364746 -35.668915 53.364838 -21.736572 30.153748 -35.669014 30.153702 -22.349716 -1.586627 -171.229736 115.102089 -171.230026 80.683197 -86.801559 115.102394 -86.801414 78.779068 85.714554 0.000000 0.000000 0.000000 155.827759 + 0.004600 5.095873 8.960791 7.145313 0.000000 0.000000 21.201977 14.401018 35.602997 164.955643 72.187988 -7.719513 55.143372 -40.452545 55.143494 -22.803345 31.940475 -40.452713 31.940598 -25.125580 44.107780 -176.608490 130.383667 -176.608871 85.045952 -92.250267 130.384186 -92.250648 87.410240 49.888184 0.000000 0.000000 0.000000 164.955643 + 0.004800 4.747071 8.712271 7.060147 0.000000 0.000000 20.519487 15.079779 35.599266 172.730469 91.809685 -22.343872 56.781189 -45.203369 56.781006 -23.774490 33.680695 -45.203339 33.680725 -27.891724 90.342430 -181.438263 145.399536 -181.437683 89.093987 -97.518929 145.399429 -97.519020 95.992638 13.708876 0.000000 0.000000 0.000000 172.730469 + 0.005000 4.573209 8.450580 6.962238 0.000000 0.000000 19.986027 15.611109 35.597137 178.816559 111.201813 -37.026489 58.260071 -49.848114 58.260803 -24.664040 35.355408 -49.847862 35.355282 -30.605873 136.365585 -185.666351 159.898102 -185.668610 92.861496 -102.542976 159.897324 -102.542603 104.378357 -22.362648 0.000000 0.000000 0.000000 178.816559 + 0.005200 4.586742 8.179471 6.852315 0.000000 0.000000 19.618528 15.977848 35.596375 183.017349 130.073990 -51.544678 59.563797 -54.312500 59.563782 -25.476540 36.941589 -54.312576 36.941536 -33.221535 181.452103 -189.252945 173.635971 -189.252899 96.358131 -107.249557 173.636200 -107.249397 112.411713 -57.884918 0.000000 0.000000 0.000000 183.017349 + 0.005400 4.787084 7.903172 6.731430 0.000000 0.000000 19.421684 16.175873 35.597557 185.285614 148.177353 -65.692291 60.675568 -58.529724 60.675461 -26.223049 38.418655 -58.529732 38.418716 -35.696449 224.957474 -192.163498 186.405090 -192.163162 99.618576 -111.577660 186.405106 -111.577843 119.955986 -92.490425 0.000000 0.000000 0.000000 185.285614 + 0.005600 5.160889 7.625358 6.600180 0.000000 0.000000 19.386425 16.214039 35.600464 185.722778 165.295822 -79.276703 61.583023 -62.437897 61.583191 -26.917030 39.769470 -62.437775 39.769470 -37.991226 266.308502 -194.383591 198.024780 -194.384109 102.689537 -115.481133 198.024399 -115.481133 126.889389 -125.870140 0.000000 0.000000 0.000000 185.722778 + 0.005800 5.681903 7.349799 6.459464 0.000000 0.000000 19.491165 16.113327 35.604492 184.569183 181.242188 -92.113586 62.276718 -65.980408 62.276352 -27.578018 40.977753 -65.980576 40.977638 -40.068024 304.985413 -195.913330 208.342316 -195.912201 105.640305 -118.920143 208.342834 -118.919785 133.100800 -157.774704 0.000000 0.000000 0.000000 184.569183 + 0.006000 6.314012 7.080259 6.310081 0.000000 0.000000 19.704351 15.905197 35.609550 182.185181 195.862305 -104.042603 62.745949 -69.106964 62.745987 -28.218857 42.026871 -69.107155 42.026855 -41.893318 340.566681 -196.753174 217.234451 -196.753296 108.522499 -121.856781 217.235046 -121.856735 138.497726 -188.002060 0.000000 0.000000 0.000000 182.185181 + 0.006200 7.012399 6.820437 6.152908 0.000000 0.000000 19.985744 15.629268 35.615013 179.024551 209.028320 -114.910797 62.987030 -71.774078 62.987534 -28.859039 42.904739 -71.773842 42.904572 -43.436852 372.673004 -196.927750 224.607086 -196.929306 111.410034 -124.269188 224.606354 -124.268669 143.001938 -216.389603 0.000000 0.000000 0.000000 179.024551 + 0.006400 7.727812 6.573628 5.988772 0.000000 0.000000 20.290213 15.330442 35.620655 175.601685 220.651932 -124.598724 62.990364 -73.945618 62.990356 -29.512024 43.599937 -73.945778 43.599838 -44.674026 401.041504 -196.443939 230.394165 -196.443924 114.358498 -126.138329 230.394669 -126.138039 146.555801 -242.836761 0.000000 0.000000 0.000000 175.601685 + 0.006600 8.409068 6.342952 5.818519 0.000000 0.000000 20.570538 15.055721 35.626259 172.454895 230.665787 -133.005768 62.752594 -75.596588 62.752441 -30.186371 44.100082 -75.596458 44.100250 -45.584576 425.473541 -195.326508 234.566574 -195.326035 117.407349 -127.441910 234.566177 -127.442429 149.116531 -267.263031 0.000000 0.000000 0.000000 172.454895 + 0.006800 9.006549 6.131293 5.642914 0.000000 0.000000 20.780756 14.850854 35.631611 170.108261 239.021439 -140.044800 62.265549 -76.701691 62.265335 -30.894073 44.397095 -76.701828 44.397095 -46.150795 445.810913 -193.581696 237.093536 -193.581039 120.604103 -128.169189 237.093964 -128.169189 150.649261 -289.623901 0.000000 0.000000 0.000000 170.108261 + 0.007000 9.475039 5.940836 5.462790 0.000000 0.000000 20.878666 14.757135 35.635803 169.034760 245.681396 -145.644623 61.526672 -77.246735 61.526428 -31.640320 44.482155 -77.246758 44.482208 -46.361118 461.936127 -191.227585 237.975052 -191.226837 123.971413 -128.304367 237.975128 -128.304535 151.136658 -309.853363 0.000000 0.000000 0.000000 169.034760 + 0.007200 9.777914 5.773540 5.278803 0.000000 0.000000 20.830257 14.808496 35.638752 169.623062 250.634567 -149.763245 60.527496 -77.222351 60.527634 -32.430023 44.349724 -77.222145 44.349792 -46.207863 473.807159 -188.256683 237.219589 -188.257111 127.526024 -127.837982 237.218948 -127.838196 150.570511 -327.941925 0.000000 0.000000 0.000000 169.623062 + 0.007400 9.888506 5.630936 5.091613 0.000000 0.000000 20.611053 15.029055 35.640106 172.149445 253.867264 -152.368179 59.262451 -76.623627 59.263321 -33.261841 43.994003 -76.623398 43.993866 -45.687473 481.390717 -184.661636 234.840820 -184.664322 131.259521 -126.755127 234.840118 -126.754707 148.951508 -343.842499 0.000000 0.000000 0.000000 172.149445 + 0.007600 9.792583 5.513984 4.902151 0.000000 0.000000 20.208717 15.431389 35.640106 176.757965 255.376282 -153.451248 57.724182 -75.453064 57.724136 -34.126984 43.410187 -75.453133 43.410248 -44.801266 484.704071 -180.419800 230.864899 -180.419662 135.134171 -125.038925 230.865112 -125.039108 146.290604 -357.508698 0.000000 0.000000 0.000000 176.757965 + 0.007800 9.489020 5.423054 4.710810 0.000000 0.000000 19.622885 16.015507 35.638390 183.448715 255.156693 -153.012543 55.904877 -73.717834 55.904846 -35.016144 42.594639 -73.717857 42.594635 -43.553600 483.762817 -175.496857 225.321091 -175.496750 139.104172 -122.670891 225.321167 -122.670876 142.603104 -368.874176 0.000000 0.000000 0.000000 183.448715 + 0.008000 8.990305 5.358083 4.518489 0.000000 0.000000 18.866877 16.768734 35.635612 192.076508 253.218994 -151.082001 53.795776 -71.431091 53.795784 -35.911743 41.545738 -71.431091 41.545593 -41.955044 478.646576 -169.845413 218.245605 -169.845444 143.092102 -119.633858 218.245605 -119.633423 137.918350 -377.877136 0.000000 0.000000 0.000000 192.076508 + 0.008200 8.321075 5.318297 4.325498 0.000000 0.000000 17.964870 17.666405 35.631275 202.358810 249.561890 -147.685150 51.394409 -68.608643 51.394424 -36.799164 40.264458 -68.608437 40.264648 -40.018002 469.394501 -163.427948 209.671814 -163.427994 147.024368 -115.914352 209.671188 -115.914940 132.266754 -384.413666 0.000000 0.000000 0.000000 202.358826 + 0.008400 7.517537 5.302536 4.132566 0.000000 0.000000 16.952639 18.673336 35.625977 213.892670 244.200638 -142.878693 48.692505 -65.274780 48.693001 -37.653961 38.752113 -65.274780 38.751923 -37.760315 456.117523 -156.180557 199.649582 -156.182083 150.792816 -111.496445 199.649582 -111.495857 125.691597 -388.392090 0.000000 0.000000 0.000000 213.892670 + 0.008600 6.624441 5.308928 3.940143 0.000000 0.000000 15.873512 19.746071 35.619583 226.180252 237.159836 -136.731796 45.687622 -61.457581 45.687584 -38.452667 37.012344 -61.457611 37.012360 -35.203556 438.944946 -148.050659 188.232758 -148.050552 154.289627 -106.369247 188.232849 -106.369293 118.244949 -389.722137 0.000000 0.000000 0.000000 226.180237 + 0.008800 5.693111 5.335246 3.748857 0.000000 0.000000 14.777214 20.835655 35.612869 238.660828 228.477554 -129.329041 42.377808 -57.189575 42.378006 -39.170929 35.053429 -57.189507 35.053421 -32.373409 418.039032 -138.982666 175.483551 -138.983276 157.403427 -100.535408 175.483337 -100.535385 109.990234 -388.320892 0.000000 0.000000 0.000000 238.660828 + 0.009000 4.777867 5.378693 3.559057 0.000000 0.000000 13.715616 21.890842 35.606461 250.747391 218.213211 -120.775734 38.766663 -52.513062 38.766434 -39.780762 32.885620 -52.513256 32.885605 -29.301422 393.617798 -128.935989 161.491913 -128.935287 160.012848 -94.004539 161.492508 -94.004494 101.009048 -384.115570 0.000000 0.000000 0.000000 250.747406 + 0.009200 3.931633 5.436369 3.371360 0.000000 0.000000 12.739363 22.861481 35.600845 261.865540 206.442307 -111.189323 34.857788 -47.469360 34.857719 -40.256042 30.521225 -47.469433 30.521194 -26.019684 365.935028 -117.870590 146.345230 -117.870377 162.005493 -86.794991 146.345444 -86.794899 91.386345 -377.075195 0.000000 0.000000 0.000000 261.865540 + 0.009400 3.203685 5.504585 3.186016 0.000000 0.000000 11.894285 23.701721 35.596008 271.490021 193.268692 -100.698181 30.670227 -42.112793 30.670105 -40.576401 27.979698 -42.112911 27.979691 -22.566895 335.283691 -105.797264 130.174362 -105.796890 163.291855 -78.951149 130.174728 -78.951126 81.230530 -367.184937 0.000000 0.000000 0.000000 271.490021 + 0.009600 2.636261 5.579807 3.003371 0.000000 0.000000 11.219440 24.373106 35.592545 279.180359 178.833817 -89.459290 26.217957 -36.500305 26.217796 -40.719437 25.280701 -36.500298 25.280777 -18.984108 302.056793 -92.716957 113.124359 -92.716461 163.783081 -70.523323 113.124336 -70.523560 70.661560 -354.515076 0.000000 0.000000 0.000000 279.180359 + 0.009800 2.261365 5.657482 2.823945 0.000000 0.000000 10.742792 24.847231 35.590023 284.611206 163.299728 -77.635498 21.528992 -30.696594 21.529129 -40.663910 22.448425 -30.696592 22.448391 -15.315422 266.682678 -78.682121 95.372490 -78.682541 163.402542 -61.582199 95.372482 -61.582092 59.813999 -339.155884 0.000000 0.000000 0.000000 284.611206 + 0.010000 2.099834 5.734335 2.648004 0.000000 0.000000 10.482174 25.107685 35.589859 287.594543 146.875427 -65.403931 16.631653 -24.766174 16.631439 -40.404305 19.514450 -24.766109 19.514500 -11.608376 229.655609 -63.756077 77.105453 -63.755417 162.131790 -52.228382 77.105255 -52.228539 48.838852 -321.297211 0.000000 0.000000 0.000000 287.594543 diff --git a/pyedr/pyedr/tests/data/1_d.edr b/pyedr/pyedr/tests/data/1_d.edr new file mode 100644 index 0000000..3e6e937 Binary files /dev/null and b/pyedr/pyedr/tests/data/1_d.edr differ diff --git a/pyedr/pyedr/tests/data/1_d.xvg b/pyedr/pyedr/tests/data/1_d.xvg new file mode 100644 index 0000000..de40cbf --- /dev/null +++ b/pyedr/pyedr/tests/data/1_d.xvg @@ -0,0 +1,106 @@ +# This file was created Tue Jan 8 08:07:33 2019 +# Created by: +# :-) GROMACS - gmx energy, 2018.4 (double precision) (-: +# +# Executable: /home/len/programs/gromacs_18.4d/bin/gmx_d +# Data prefix: /home/len/programs/gromacs_18.4d +# Working dir: /home/len/edr_python/tests_old +# Command line: +# gmx_d energy -f /home/len/Dokumente/edr-rs/tests/regressiontests/simple/imp1/1_d.edr -o /home/len/Dokumente/edr-rs/tests/regressiontests/simple/imp1/1_d.xvg -dp +# gmx energy is part of G R O M A C S: +# +# Guyana Rwanda Oman Macau Angola Cameroon Senegal +# +@ title "GROMACS Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Improper Dih." +@ s2 legend "LJ (SR)" +@ s3 legend "Coulomb (SR)" +@ s4 legend "Potential" +@ s5 legend "Kinetic En." +@ s6 legend "Total Energy" +@ s7 legend "Temperature" +@ s8 legend "Pressure (bar)" +@ s9 legend "Vir-XX" +@ s10 legend "Vir-XY" +@ s11 legend "Vir-XZ" +@ s12 legend "Vir-YX" +@ s13 legend "Vir-YY" +@ s14 legend "Vir-YZ" +@ s15 legend "Vir-ZX" +@ s16 legend "Vir-ZY" +@ s17 legend "Vir-ZZ" +@ s18 legend "Pres-XX (bar)" +@ s19 legend "Pres-XY (bar)" +@ s20 legend "Pres-XZ (bar)" +@ s21 legend "Pres-YX (bar)" +@ s22 legend "Pres-YY (bar)" +@ s23 legend "Pres-YZ (bar)" +@ s24 legend "Pres-ZX (bar)" +@ s25 legend "Pres-ZY (bar)" +@ s26 legend "Pres-ZZ (bar)" +@ s27 legend "#Surf*SurfTen" +@ s28 legend "Mu-X" +@ s29 legend "Mu-Y" +@ s30 legend "Mu-Z" +@ s31 legend "T-System" + 0.000000 0.247461039231 5.023642729005 0.000000000000 0.000000000000 5.271103768236 24.190951948450 29.462055716686 277.093881628997 19.718207283133 -12.779335207310 1.074572880934 -6.934927251811 1.074572880934 14.993545400298 -2.242192082518 -6.934927251811 -2.242192082517 2.842675687354 76.576853525235 -3.236660520794 24.413745813784 -3.236660520793 -32.100445109765 7.962727040415 24.413745813784 7.962727040414 14.678213433930 -16.517672777950 0.000000000000 0.000000000000 0.000000000000 277.093881628997 + 0.000200 0.327091057183 5.248125936790 0.000000000000 0.000000000000 5.575216993973 23.887091566122 29.462308560094 273.613330181828 7.994608121810 -2.904826331674 2.232253663021 -5.548549847618 2.232253663021 15.443787951070 -2.503419778402 -5.548549847618 -2.503419778402 3.590357762123 45.754561204025 -6.706363108208 20.291666488822 -6.706363108208 -33.755187267327 8.465546799608 20.291666488822 8.465546799608 11.984450428731 13.075990097046 0.000000000000 0.000000000000 0.000000000000 273.613330181828 + 0.000400 0.640587597469 5.469630093595 0.000000000000 0.000000000000 6.110217691064 23.354051151562 29.464268842626 267.507649105270 -3.903636565584 7.068425135020 3.370299661597 -4.075457906639 3.370299661597 15.672662315031 -2.739972610959 -4.075457906639 -2.739972610959 4.400957147327 14.074525931768 -10.091080109384 15.674506462139 -10.091080109384 -34.694699042315 9.002566913207 15.674506462139 9.002566913206 8.909263413794 41.991973706365 0.000000000000 0.000000000000 0.000000000000 267.507649105270 + 0.000600 1.173761404730 5.687233420928 0.000000000000 0.000000000000 6.860994825658 22.606836626360 29.467831452017 258.948722873718 -15.724572478758 16.932577469373 4.504895713462 -2.576994928692 4.504895713462 15.692848365817 -2.935695122095 -2.576994928692 -2.935695122095 5.240151323767 -17.786725654729 -13.444851307047 10.761857219959 -13.444851307048 -34.962415435740 9.514649112579 10.761857219959 9.514649112579 5.575423654196 69.806903901552 0.000000000000 0.000000000000 0.000000000000 258.948722873718 + 0.000800 1.899586079495 5.900040344297 0.000000000000 0.000000000000 7.799626423793 21.673163278027 29.472789701819 248.254014669823 -27.198374372963 26.475728733569 5.652987720764 -1.117418218239 5.652987720764 15.519392910810 -3.073470121781 -1.117418218239 -3.073470121781 6.070678891425 -49.113225131032 -16.830108845751 5.774206395434 -16.830108845751 -34.604799325159 9.934002734479 5.774206395434 9.934002734479 2.122901337301 96.095204102439 0.000000000000 0.000000000000 0.000000000000 248.254014669823 + 0.001000 2.779843921516 6.107179444825 0.000000000000 0.000000000000 8.887023366341 20.591825088841 29.478848455182 235.867887954610 -38.044092333053 35.486254939601 6.831739247589 0.237565870250 6.831739247589 15.169329434185 -3.135725616681 0.237565870250 -3.135725616681 6.853297410391 -79.166471552489 -20.315193333858 0.947130215164 -20.315193333859 -33.670688837564 10.186633652691 0.947130215164 10.186633652691 -1.295116609106 120.438154111828 0.000000000000 0.000000000000 0.000000000000 235.867887954610 + 0.001200 3.767478400464 6.307800816750 0.000000000000 0.000000000000 10.075279217214 19.410363723864 29.485642941078 222.334906023439 -47.977662392692 43.757485082453 8.057890659151 1.422450061271 8.057890659151 14.661346040075 -3.105028476246 1.422450061270 -3.105028476246 7.547882721479 -107.204823982724 -23.971178091849 -3.475748087665 -23.971178091849 -32.211103372820 10.195365717014 -3.475748087665 10.195365717014 -4.517059822532 142.434303188674 0.000000000000 0.000000000000 0.000000000000 222.334906023439 + 0.001400 4.809502870473 6.501073108182 0.000000000000 0.000000000000 11.310575978655 18.182186069931 29.492762048586 208.266815020511 -56.720824210091 51.092563378362 9.347051542994 2.373701149864 9.347051542994 14.015492680057 -2.964736948776 2.373701149863 -2.964736948777 8.114630513896 -132.504604933653 -27.868181821041 -7.250739181551 -27.868181821041 -30.279407146038 9.883274267119 -7.250739181549 9.883274267120 -7.378460550580 161.710716600830 0.000000000000 0.000000000000 0.000000000000 208.266815020511 + 0.001600 5.850279475323 6.686180499413 0.000000000000 0.000000000000 12.536459974736 16.963314622052 29.499774596788 194.305321424923 -64.010518831324 57.309328582828 10.712963426580 3.031594671500 10.712963426580 13.252914076200 -2.699679293537 3.031594671499 -2.699679293538 8.515313830238 -154.382006424466 -32.071388272750 -10.142644244311 -32.071388272749 -27.931700106222 9.177341515602 -10.142644244310 9.177341515603 -9.717849963285 177.934451000504 0.000000000000 0.000000000000 0.000000000000 194.305321424923 + 0.001800 6.834958509177 6.862319845321 0.000000000000 0.000000000000 13.697278354498 15.808978532267 29.506256886765 181.083044413883 -69.608295198393 62.245028429462 12.166773747906 3.342034921582 12.166773747906 12.395591795582 -2.296822914421 3.342034921581 -2.296822914421 8.714545447352 -172.214805579123 -36.637015785169 -11.933475709722 -36.637015785168 -25.227288432735 8.012125727770 -11.933475709721 8.012125727770 -11.382791583322 190.823609079835 0.000000000000 0.000000000000 0.000000000000 181.083044413883 + 0.002000 7.712858320046 7.028698179454 0.000000000000 0.000000000000 14.741556499499 14.770263260785 29.511819760284 169.185139482503 -73.309238054729 65.760684968101 13.716363372587 3.258282905787 13.716363372587 11.466077880682 -1.745897670264 3.258282905788 -1.745897670264 8.680991980095 -185.462869026456 -41.608488274102 -12.430906954695 -41.608488274103 -22.229081591847 6.333231359837 -12.430906954696 6.333231359837 -12.235763545885 200.157321126310 0.000000000000 0.000000000000 0.000000000000 169.185139482503 + 0.002200 8.440569817206 7.184530749782 0.000000000000 0.000000000000 15.625100566988 13.891032855281 29.516133422269 159.114044867189 -74.949943524256 67.744934250422 15.365768578469 2.742516038876 15.365768578469 10.487203335927 -1.039938558505 2.742516038876 -1.039938558505 8.388487295321 -193.686457260847 -47.013051848550 -11.476018158856 -47.013051848549 -19.003770379645 4.100375983493 -11.476018158856 4.100375983493 -12.159602932276 205.784040724247 0.000000000000 0.000000000000 0.000000000000 159.114044867189 + 0.002400 8.984587506883 7.329039731777 0.000000000000 0.000000000000 16.313627238660 13.205321190075 29.518948428735 151.259599643416 -74.415111277360 68.117181170931 17.114734416056 1.767148975502 17.114734416055 9.481747520217 -0.175716640343 1.767148975502 -0.175716640343 7.816996394168 -196.561430277147 -52.859058125012 -8.949934172429 -52.859058125011 -15.621659864000 1.289871380931 -8.949934172429 1.289871380930 -11.062243690934 207.627621708873 0.000000000000 0.000000000000 0.000000000000 151.259599643416 + 0.002600 9.323299577423 7.461453744299 0.000000000000 0.000000000000 16.784753321722 12.735358167679 29.520111489401 145.876434963689 -71.642391378850 66.829936476802 18.958429936715 0.315854581482 18.958429936715 8.472058867817 0.845967324612 0.315854581483 0.845967324612 6.953387145591 -193.890599265703 -59.134097978424 -4.779003433623 -59.134097978424 -12.156061210222 -2.103630743057 -4.779003433624 -2.103630743058 -8.880513660624 205.690758778067 0.000000000000 0.000000000000 0.000000000000 145.876434963689 + 0.002800 9.448210912248 7.581008278287 0.000000000000 0.000000000000 17.029219190536 12.490355878022 29.519575068558 143.070070187565 -66.625215492059 63.870236629651 20.887347353477 -1.615762786871 20.887347353477 7.479623009040 2.020144883361 -1.615762786871 2.020144883361 5.791975794342 -185.610657688346 -65.804120250008 1.061758356104 -65.804120250006 -8.682184849994 -6.066235543913 1.061758356104 -6.066235543912 -5.582803937838 200.055517883026 0.000000000000 0.000000000000 0.000000000000 143.070070187565 + 0.003000 9.364322361460 7.686947136661 0.000000000000 0.000000000000 17.051269498121 12.466130669299 29.517400167420 142.792583913658 -59.413450501670 59.260086485615 22.887397281462 -4.019873583014 22.887397281461 6.524580840953 3.337707565408 -4.019873583014 3.337707565409 4.334822540633 -171.794347561075 -72.813611947017 8.547144473276 -72.813611947016 -5.275521537729 -10.564802343182 8.547144473276 -10.564802343182 -1.170482406205 190.880845771189 0.000000000000 0.000000000000 0.000000000000 142.792583913658 + 0.003200 9.089643966370 7.778524975737 0.000000000000 0.000000000000 16.868168942106 12.645583168588 29.513752110694 144.848112348502 -50.111831169089 53.055907462853 24.940201414068 -6.876523030919 24.940201414068 5.625205902518 4.785601324691 -6.876523030919 4.785601324691 2.591765105229 -152.647760039243 -80.086853400104 17.602235027702 -80.086853400105 -2.009744352247 -15.547847909291 17.602235027703 -15.547847909290 4.322010884222 178.397120707872 0.000000000000 0.000000000000 0.000000000000 144.848112348502 + 0.003400 8.653875605661 7.855011031716 0.000000000000 0.000000000000 16.508886637377 13.000002973465 29.508889610842 148.907793822343 -38.876249837715 45.347017577121 27.023573000656 -10.154120200536 27.023573000656 4.797356995017 6.347179846433 -10.154120200537 6.347179846432 0.580190385792 -128.502918919256 -87.530197704751 28.104850111123 -87.530197704750 1.045789759459 -20.947308470826 28.104850111124 -20.947308470825 10.828379646654 162.897977643735 0.000000000000 0.000000000000 0.000000000000 148.907793822343 + 0.003600 8.096342126835 7.915694108873 0.000000000000 0.000000000000 16.012036235709 13.491111581105 29.503147816813 154.533169404183 -25.908097976155 36.253211969286 29.112164988343 -13.810293299760 29.112164988343 4.053927831356 8.002700316398 -13.810293299760 8.002700316398 -1.675443618888 -99.806036519604 -95.035262651330 39.889845501471 -95.035262651328 3.828819073498 -26.681063761709 39.889845501471 -26.681063761710 18.252923517640 144.729800154393 0.000000000000 0.000000000000 0.000000000000 154.533169404183 + 0.003800 7.463317992040 7.959888896350 0.000000000000 0.000000000000 15.423206888390 14.073709553553 29.496916441944 161.206504705699 -11.446959284874 25.921550935400 31.178256331582 -17.793071284012 31.178256331583 3.404320108646 9.729937766177 -17.793071284012 9.729937766177 -4.144312176876 -67.102049201576 -102.482869143312 52.755019915679 -102.482869143312 6.287083171355 -32.656083308826 52.755019915678 -32.656083308826 26.474088175599 124.279408287026 0.000000000000 0.000000000000 0.000000000000 161.206504705699 + 0.004000 6.804915714743 7.986943665463 0.000000000000 0.000000000000 14.791859380206 14.698755002999 29.490614383205 168.366052215470 4.237959256703 14.522494840096 33.192639338926 -22.042337228990 33.192639338925 2.853969372775 11.504888093334 -22.042337228989 11.504888093335 -6.790121218091 -31.016221561773 -109.747516259227 66.468318718382 -109.747516259225 8.381178548014 -38.772021145638 66.468318718381 -38.772021145639 35.348920783868 101.960577272203 0.000000000000 0.000000000000 0.000000000000 168.366052215470 + 0.004200 6.171740365192 7.996249376480 0.000000000000 0.000000000000 14.167989741672 15.316672729042 29.484662470714 175.443955623385 20.857208946986 2.245549858530 35.125565489928 -26.491487448526 35.125565489928 2.403954086817 13.302525662808 -26.491487448526 13.302525662808 -9.572156640647 7.766256655297 -116.702152413975 80.775954235755 -116.702152413975 10.087174382258 -44.925062252137 80.775954235755 -44.925062252136 44.718195803403 78.200090088520 0.000000000000 0.000000000000 0.000000000000 175.443955623385 + 0.004400 5.611527373181 7.987250190648 0.000000000000 0.000000000000 13.598777563829 15.880678543876 29.479456107705 181.904328114172 38.110808361237 -10.705396066883 36.947704242919 -31.069222713324 36.947704242919 2.050717260368 15.097579259159 -31.069222713324 15.097579259158 -12.446438946915 48.521676465054 -123.222986426153 95.411021311308 -123.222986426152 11.398800251486 -51.011813619159 95.411021311309 -51.011813619158 54.411948367171 53.424052604380 0.000000000000 0.000000000000 0.000000000000 181.904328114172 + 0.004600 5.165981790880 7.959455337793 0.000000000000 0.000000000000 13.125437128673 16.349902440406 29.475339569079 187.279026518745 55.697788356600 -24.116862113527 38.631069131565 -35.701394543427 38.631069131565 1.785926825906 16.865290174597 -35.701394543427 16.865290174597 -15.366933804138 90.509192578897 -129.194082624074 110.102170923591 -129.194082624073 12.329031977977 -56.933035413546 110.102170923591 -56.933035413547 64.255140512926 28.045181600018 0.000000000000 0.000000000000 0.000000000000 187.279026518745 + 0.004800 4.868024032985 7.912452231061 0.000000000000 0.000000000000 12.780476264047 16.692107356475 29.472583620522 191.198793244269 73.325104995852 -37.770507856795 40.149867905080 -40.312830545302 40.149867905079 1.596495788057 18.582118342744 -40.312830545302 18.582118342744 -18.286769034464 132.991196136534 -134.511500288161 124.581915376631 -134.511500288161 12.910928757370 -62.597022919519 124.581915376631 -62.597022919518 74.073190093652 2.451714272921 0.000000000000 0.000000000000 0.000000000000 191.198793244269 + 0.005000 4.739620729409 7.845920648694 0.000000000000 0.000000000000 12.585541378103 16.885826528948 29.471367907051 193.417738474738 90.715503593436 -51.447644573097 41.481238419331 -44.829068006594 41.481238419331 1.464776290974 20.226366483120 -44.829068006594 20.226366483120 -21.159411103162 175.251785592877 -139.086768539008 138.594174897668 -139.086768539008 13.197612661812 -67.922476551685 138.594174897669 -67.922476551685 83.697112525620 -23.001513603872 0.000000000000 0.000000000000 0.000000000000 193.417738474738 + 0.005200 4.790341403581 7.759647719138 0.000000000000 0.000000000000 12.549989122719 16.921780129930 29.471769252649 193.829566949935 107.613992868628 -64.933380854547 42.605839090890 -49.177934043777 42.605839090891 1.368933538963 21.778697905236 -49.177934043777 21.778697905236 -23.939759148232 216.612590353714 -142.849531076671 151.900734915306 -142.849531076672 13.261328175844 -72.840733327785 151.900734915305 -72.840733327785 92.968060076327 -47.999408854306 0.000000000000 0.000000000000 0.000000000000 193.829566949935 + 0.005400 5.016734668044 7.653543354633 0.000000000000 0.000000000000 12.670278022677 16.803478609243 29.473756631920 192.474488917468 123.792683467675 -78.020288503158 43.508271501021 -53.290922876011 43.508271501021 1.283496458392 23.222530530211 -53.290922876011 23.222530530211 -26.585121589176 256.445389164472 -145.749247959335 164.286361843218 -145.749247959336 13.191571630393 -77.297276184951 164.286361843217 -77.297276184951 101.741089608160 -72.270130183057 0.000000000000 0.000000000000 0.000000000000 192.474488917468 + 0.005600 5.402564537614 7.527655684057 0.000000000000 0.000000000000 12.930220221670 16.546972922320 29.477193143991 189.536359132386 139.053853669524 -90.511509417518 44.177322600674 -57.104335429425 44.177322600674 1.180072658659 24.544297348200 -57.104335429425 24.544297348200 -29.056048859255 294.181181835298 -147.755900272254 175.562417622272 -147.755900272255 13.092334864209 -81.252484422499 175.562417622271 -81.252484422499 109.888044309066 -95.585691120694 0.000000000000 0.000000000000 0.000000000000 189.536359132386 + 0.005800 5.919891721472 7.382185946512 0.000000000000 0.000000000000 13.302077667984 16.179767198688 29.481844866672 185.330222080218 153.231219881857 -102.223261747672 44.606024271063 -60.560162472831 44.606024271063 1.028206222324 25.733571426718 -60.560162472831 25.733571426718 -31.317005230531 329.315604897434 -148.859704089548 185.568913439778 -148.859704089548 13.078560585146 -84.681636125432 185.568913439778 -84.681636125433 117.299494162990 -117.759764303112 0.000000000000 0.000000000000 0.000000000000 185.330222080218 + 0.006000 6.530929965507 7.217502230928 0.000000000000 0.000000000000 13.748432196436 15.738963827235 29.487396023671 180.281064961829 166.189503152678 -112.986741564540 44.791538078722 -63.606708784228 44.791538078721 0.796348701983 26.783061202098 -63.606708784229 26.783061202098 -33.336872409510 361.410814550673 -149.069898525048 194.175044310735 -149.069898525045 13.271955220993 -87.574218444467 194.175044310737 -87.574218444466 123.885739686369 -138.642971225607 0.000000000000 0.000000000000 0.000000000000 180.281064961829 + 0.006200 7.190557213095 7.034151394494 0.000000000000 0.000000000000 14.224708607589 15.268760881209 29.493469488798 174.895152090542 177.822488070468 -122.649452266057 44.734882291931 -66.198971373069 44.734882291930 0.452906947235 27.688488639253 -66.198971373070 27.688488639254 -35.089286937147 390.094179123193 -148.412725046318 201.278341861248 -148.412725046316 13.796345346858 -89.932641089264 201.278341861249 -89.932641089265 129.576939741352 -158.116101752608 0.000000000000 0.000000000000 0.000000000000 174.895152090542 + 0.006400 7.849318788367 6.832868473267 0.000000000000 0.000000000000 14.682187261635 14.817464042953 29.499651304588 169.725798154177 188.049860380310 -131.076025663928 44.440526039462 -68.298798527516 44.440526039462 -0.032673532772 28.448368515684 -68.298798527516 28.448368515684 -36.552821839942 415.054314450499 -146.928758245090 206.802666373491 -146.928758245090 14.772793392494 -91.770479792691 206.802666373491 -91.770479792691 134.322473297937 -176.081841683442 0.000000000000 0.000000000000 0.000000000000 169.725798154177 + 0.006600 8.456727736704 6.614582920827 0.000000000000 0.000000000000 15.071310657531 14.434206973979 29.505517631510 165.335801880774 196.813178697477 -138.148624194789 43.915881444113 -69.874867540912 43.915881444113 -0.688833725213 29.063711250360 -69.874867540912 29.063711250360 -37.711029942228 436.035147070829 -144.669779304891 210.695325415034 -144.669779304891 16.314705330922 -93.110397918271 210.695325415035 -93.110397918270 138.089683690680 -192.455686241211 0.000000000000 0.000000000000 0.000000000000 165.335801880774 + 0.006800 8.964647963470 6.380421081160 0.000000000000 0.000000000000 15.345069044630 14.165593340293 29.510662384922 162.258982308922 204.071379528625 -143.767031424782 43.170728343783 -70.902526710525 43.170728343782 -1.540879256717 29.537674147116 -70.902526710525 29.537674147116 -38.552371375645 452.828792409056 -141.695400791849 212.923650854853 -141.695400791849 18.523166340316 -93.981904668129 212.923650854854 -93.981904668129 140.862179836503 -207.156776041633 0.000000000000 0.000000000000 0.000000000000 162.258982308922 + 0.007000 9.330540164969 6.131704421733 0.000000000000 0.000000000000 15.462244586702 14.052479183912 29.514723770614 160.963322645533 209.796230749592 -147.848546923154 42.216607676417 -71.363551146631 42.216607676417 -2.610054025664 29.875186573601 -71.363551146631 29.875186573601 -39.070050867772 465.268081741141 -138.069654473805 213.471385938011 -138.069654473805 21.482729846131 -94.419107205510 213.471385938011 -94.419107205509 142.637880661503 -220.099405723971 0.000000000000 0.000000000000 0.000000000000 160.963322645533 + 0.007200 9.520359122120 5.869943218757 0.000000000000 0.000000000000 15.390302340877 14.127105658676 29.517407999553 161.818127351384 213.968135910387 -150.327801207619 41.066218765201 -71.245861900264 41.066218765200 -3.912747589843 30.082573497557 -71.245861900265 30.082573497557 -39.261791273504 473.219559779841 -133.857743041460 212.335228225723 -133.857743041458 25.257861640705 -94.458601979796 212.335228225725 -94.458601979796 143.426986310614 -231.185922310939 0.000000000000 0.000000000000 0.000000000000 161.818127351384 + 0.007400 9.510913185053 5.596825589874 0.000000000000 0.000000000000 15.107738774926 14.410769868853 29.518508643780 165.067342894649 216.572651299270 -151.156596958177 39.732852771848 -70.543254013573 39.732852771847 -5.459868324898 30.167199121576 -70.543254013573 30.167199121576 -39.129568608325 476.577704993950 -129.123133264507 209.521843281204 -129.123133264506 29.890205541494 -94.137628964902 209.521843281205 -94.137628964902 143.250043362365 -240.301651423486 0.000000000000 0.000000000000 0.000000000000 165.067342894649 + 0.007600 9.291531287310 5.314201995637 0.000000000000 0.000000000000 14.605733282947 14.912187093881 29.517920376828 170.810797947374 217.598012479974 -150.303864814800 38.229889797399 -69.255171690499 38.229889797399 -7.256406479304 30.137148370826 -69.255171690499 30.137148370826 -38.679330783141 475.261001797506 -123.925134496408 205.045610425919 -123.925134496407 35.396792604554 -93.492583383972 205.045610425920 -93.492583383972 142.136243037864 -247.312368265486 0.000000000000 0.000000000000 0.000000000000 170.810797947374 + 0.007800 8.864927367786 5.024065562285 0.000000000000 0.000000000000 13.888992930071 15.626653275047 29.515646205117 178.994610136895 217.033881521513 -147.755797129861 36.570380920302 -67.386558493487 36.570380920302 -9.301202195059 30.000959052742 -67.386558493487 30.000959052742 -37.920717686914 469.210325512789 -118.317065406633 198.927289721267 -118.317065406635 41.769265116381 -92.557945267222 198.927289721266 -92.557945267221 140.122053935369 -252.064672861242 0.000000000000 0.000000000000 0.000000000000 178.994610136895 + 0.008000 8.247203772124 4.728528794120 0.000000000000 0.000000000000 12.975732566245 16.536065151811 29.511797718056 189.411416696187 214.871426214084 -143.516192843849 34.766729358818 -64.947798112222 34.766729358818 -11.586923872917 29.767412033030 -64.947798112222 29.767412033030 -36.866794678571 458.389898579615 -112.345066592563 191.193713871202 -112.345066592563 48.974132628936 -91.365650616604 191.193713871203 -91.365650616604 137.250247433700 -254.389443736299 0.000000000000 0.000000000000 0.000000000000 189.411416696187 + 0.008200 7.466990711607 4.429797425395 0.000000000000 0.000000000000 11.896788137002 17.609800199357 29.506588336359 201.710453658421 211.104734994224 -137.607013359416 32.830477452421 -61.954747781299 32.830477452421 -14.100252499680 29.445381189572 -61.954747781299 29.445381189572 -35.533805456880 442.790853263091 -106.047570633271 181.878516229472 -106.047570633272 56.954023480087 -89.944891821567 181.878516229472 -89.944891821566 133.569328239493 -254.108341358871 0.000000000000 0.000000000000 0.000000000000 201.710453658421 + 0.008400 6.563774587320 4.130142292718 0.000000000000 0.000000000000 10.693916880038 18.806403111009 29.500319991048 215.416873573806 205.733463379207 -130.069115312431 30.772198789683 -58.428852877406 30.772198789683 -16.822258271204 29.043739632115 -58.428852877406 29.043739632115 -33.940944219178 422.437207095430 -99.455397354147 171.023813237511 -99.455397354148 65.629844731234 -88.322301899243 171.023813237511 -88.322301899243 129.133338310958 -251.043123956877 0.000000000000 0.000000000000 0.000000000000 215.416873573806 + 0.008600 5.585520335730 3.831870179385 0.000000000000 0.000000000000 9.417390515116 20.075973574937 29.493364090053 229.959096161858 198.766506750061 -120.963093963237 28.601488042560 -54.397318634450 28.601488042560 -19.728947548142 28.571314087599 -54.397318634450 28.571314087599 -32.110141516482 397.393838068702 -92.592403356230 158.682673102467 -92.592403356229 74.903719141517 -86.522449381651 158.682673102467 -86.522449381651 124.001963039965 -245.027336410615 0.000000000000 0.000000000000 0.000000000000 229.959096161858 + 0.008800 4.585738534292 3.537294588593 0.000000000000 0.000000000000 8.123033122885 21.363104874941 29.486137997825 244.702468346808 190.226407175378 -110.370142954948 26.327035303663 -49.893304236560 26.327035303663 -22.791951304245 28.036875756257 -49.893304236561 28.036875756257 -30.065853720142 367.775852361034 -85.476583463468 144.922128543150 -85.476583463468 84.662532091088 -84.568549994992 144.922128543150 -84.568549994992 118.240837074012 -235.919750548218 0.000000000000 0.000000000000 0.000000000000 244.702468346808 + 0.009000 3.620183878108 3.248707346310 0.000000000000 0.000000000000 6.868891224418 22.610187317516 29.479078541934 258.987103174774 180.154134579288 -98.392814561681 23.956767275831 -44.956096604398 23.956767275831 -25.979321107590 27.449153563640 -44.956096604398 27.449153563640 -27.834842893776 333.758581894355 -78.121499236590 129.826435251796 -78.121499236592 94.781896091045 -82.483288827228 129.826435251795 -82.483288827228 111.921925752462 -223.618784474600 0.000000000000 0.000000000000 0.000000000000 258.987103174774 + 0.009200 2.743395488685 2.968351825479 0.000000000000 0.000000000000 5.711747314164 23.760866936700 29.472614250864 272.167497351510 168.613839564869 -85.155551033183 21.498034738936 -39.631216604245 21.498034738936 -29.256395535055 26.816854690318 -39.631216604245 26.816854690318 -25.445932352918 295.587343670049 -70.537896980293 113.500243322624 -70.537896980294 105.130326823021 -80.289642969611 113.500243322624 -80.289642969612 105.123848201538 -208.077020209103 0.000000000000 0.000000000000 0.000000000000 272.167497351510 + 0.009400 2.005299812389 2.698398434276 0.000000000000 0.000000000000 4.703698246665 24.763439860409 29.467138107074 283.651411818323 155.697159654846 -70.804853472442 18.957824413494 -33.970409571215 18.957824413494 -32.586698865357 26.148677576133 -33.970409571214 26.148677576133 -22.929723398672 253.586045821379 -62.735374930616 96.071338729737 -62.735374930616 115.573422997636 -78.011599528406 96.071338729737 -78.011599528406 97.932010145523 -189.314881349553 0.000000000000 0.000000000000 0.000000000000 283.651411818323 + 0.009600 1.448092957422 2.440922837815 0.000000000000 0.000000000000 3.889015795237 25.573966768740 29.462982563976 292.935546137329 141.526673833785 -55.508960481737 16.342973641401 -28.031475073201 16.342973641401 -35.932834899405 25.453304189207 -28.031475073201 25.453304189207 -20.318260596270 208.163741069573 -54.723966113339 77.692626755066 -54.723966113340 125.977852435075 -75.674676722109 77.692626755065 -75.674676722109 90.438427996708 -167.432531226154 0.000000000000 0.000000000000 0.000000000000 292.935546137329 + 0.009800 1.103601471380 2.197887200349 0.000000000000 0.000000000000 3.301488671729 26.158909755904 29.460398427633 299.635742276381 126.258141435490 -39.456924544426 13.660368095415 -21.877897608783 13.660368095415 -39.257341682325 24.739361056003 -21.877897608783 24.739361056003 -17.644636370885 159.818307065511 -46.515518712908 58.543068126772 -46.515518712908 136.214967736402 -73.306175303507 58.543068126772 -73.306175303507 82.741149504556 -142.619109170045 0.000000000000 0.000000000000 0.000000000000 299.635742276381 + 0.010000 0.991289943350 1.971124557668 0.000000000000 0.000000000000 2.962414501018 26.497124452392 29.459538953410 303.509803258914 110.081228134862 -22.856999065377 10.917105808751 -15.578250030402 10.917105808751 -42.523477501235 24.015342126872 -15.578250030402 24.015342126872 -14.942530332013 109.136571020531 -38.124778232798 38.827338970159 -38.124778232798 146.163905193139 -70.935112170099 38.827338970159 -70.935112170098 74.943208190917 -115.158536471418 0.000000000000 0.000000000000 0.000000000000 303.509803258914 diff --git a/pyedr/pyedr/tests/data/1_d_units.p b/pyedr/pyedr/tests/data/1_d_units.p new file mode 100644 index 0000000..f30c5bd Binary files /dev/null and b/pyedr/pyedr/tests/data/1_d_units.p differ diff --git a/pyedr/pyedr/tests/data/1_units.p b/pyedr/pyedr/tests/data/1_units.p new file mode 100644 index 0000000..fedfa89 Binary files /dev/null and b/pyedr/pyedr/tests/data/1_units.p differ diff --git a/pyedr/pyedr/tests/data/2.edr b/pyedr/pyedr/tests/data/2.edr new file mode 100644 index 0000000..14e28fc Binary files /dev/null and b/pyedr/pyedr/tests/data/2.edr differ diff --git a/pyedr/pyedr/tests/data/2.xvg b/pyedr/pyedr/tests/data/2.xvg new file mode 100644 index 0000000..ab9453f --- /dev/null +++ b/pyedr/pyedr/tests/data/2.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 16:10:49 2022 +# by the following command: +# g_energy -f 2.edr -o 2.xvg +# +# g_energy is part of G R O M A C S: +# +# Giant Rising Ordinary Mutants for A Clerical Setup +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247461 6.340124 5.023656 0.000000 0.000000 11.611240 23.976971 35.588211 274.642853 19.498394 1.011414 9.334961 -7.721680 9.334778 6.738232 5.942091 -7.721688 5.942282 -2.693439 33.680153 -29.047258 26.974480 -29.046692 -7.063100 -17.232744 26.974506 -17.233335 31.878130 40.572357 0.000000 0.000000 0.000000 274.642853 + 0.000200 0.327350 6.765538 5.246391 0.000000 0.000000 12.339279 23.249716 35.588997 266.312561 7.368578 12.192444 11.298340 -6.421600 11.298370 6.445600 6.492627 -6.421630 6.492640 -2.538615 -1.707093 -35.554718 23.380007 -35.554810 -7.371385 -19.025429 23.380102 -19.025471 31.184212 78.051453 0.000000 0.000000 0.000000 266.312561 + 0.000400 0.642607 7.180584 5.463940 0.000000 0.000000 13.287131 22.304394 35.591526 255.484406 -4.897417 23.384888 13.210754 -5.048309 13.210816 5.965264 7.018380 -5.048265 7.018343 -2.293427 -37.682041 -41.876396 19.339260 -41.876587 -7.025980 -20.627542 19.339121 -20.627430 30.015774 114.421700 0.000000 0.000000 0.000000 255.484406 + 0.000600 1.180128 7.580680 5.674911 0.000000 0.000000 14.435720 21.159878 35.595596 242.374634 -17.028549 34.376686 15.088623 -3.664551 15.088660 5.297347 7.536289 -3.664551 7.536319 -1.990069 -73.542625 -48.054462 15.054487 -48.054577 -6.023780 -22.094305 15.054488 -22.094397 28.480759 149.148560 0.000000 0.000000 0.000000 242.374619 + 0.000800 1.913710 7.961715 5.878055 0.000000 0.000000 15.753480 19.847660 35.601139 227.343887 -28.750631 44.949188 16.940918 -2.332245 16.940960 4.458074 8.058337 -2.332156 8.058358 -1.660697 -108.538231 -54.113518 10.737396 -54.113647 -4.408633 -23.470844 10.737121 -23.470909 26.694969 181.712982 0.000000 0.000000 0.000000 227.343887 + 0.001000 2.805708 8.319745 6.072149 0.000000 0.000000 17.197601 18.410265 35.607864 210.879318 -39.764687 54.881767 18.781372 -1.117798 18.781591 3.457321 8.601676 -1.117868 8.601637 -1.342145 -141.887848 -60.097897 6.624296 -60.098576 -2.202137 -24.823021 6.624513 -24.822901 24.795923 211.585785 0.000000 0.000000 0.000000 210.879333 + 0.001200 3.809221 8.651253 6.255630 0.000000 0.000000 18.716103 16.898926 35.615028 193.567780 -49.778061 63.966057 20.626099 -0.086487 20.626057 2.308470 9.182260 -0.086435 9.182348 -1.072195 -172.829651 -66.063568 2.956823 -66.063438 0.565360 -26.216885 2.956664 -26.217159 22.930115 238.287964 0.000000 0.000000 0.000000 193.567780 + 0.001400 4.871191 8.952931 6.427728 0.000000 0.000000 20.251850 15.370675 35.622524 176.062515 -58.497601 71.999420 22.484985 0.700012 22.485229 1.023667 9.816681 0.700194 9.816706 -0.887778 -200.607407 -72.050392 -0.028245 -72.051147 3.868672 -27.723318 -0.028807 -27.723394 21.245937 261.345093 0.000000 0.000000 0.000000 176.062515 + 0.001600 5.935035 9.222474 6.587539 0.000000 0.000000 21.745049 13.885089 35.630138 159.045959 -65.656227 78.792267 24.369995 1.181427 24.369965 -0.370968 10.517559 1.181514 10.517661 -0.825019 -224.500504 -78.106499 -2.095108 -78.106407 7.639770 -29.402573 -2.095377 -29.402884 19.892054 280.369080 0.000000 0.000000 0.000000 159.045959 + 0.001800 6.944662 9.457582 6.733941 0.000000 0.000000 23.136183 12.500835 35.637016 143.190109 -71.001266 84.179855 26.286316 1.308167 26.286461 -1.863960 11.299806 1.308092 11.299637 -0.917173 -243.868179 -84.259506 -3.040763 -84.259956 11.855254 -31.322390 -3.040534 -31.321871 19.009129 294.992859 0.000000 0.000000 0.000000 143.190109 + 0.002000 7.848121 9.656350 6.866272 0.000000 0.000000 24.370743 11.272213 35.642956 129.116928 -74.318054 88.022118 28.248047 1.029572 28.248093 -3.436181 12.175746 1.029699 12.175802 -1.197309 -258.156647 -90.563683 -2.661800 -90.563828 16.466368 -33.541569 -2.662194 -33.541744 18.736120 304.968292 0.000000 0.000000 0.000000 129.116928 + 0.002200 8.600101 9.817728 6.983742 0.000000 0.000000 25.401571 10.245968 35.647537 117.361855 -75.436821 90.203812 30.255188 0.312531 30.255093 -5.065352 13.154125 0.312383 13.154062 -1.690453 -266.906494 -97.027473 -0.814932 -97.027176 21.411911 -36.105671 -0.814474 -36.105476 19.184122 310.103119 0.000000 0.000000 0.000000 117.361855 + 0.002400 9.165579 9.940764 7.085793 0.000000 0.000000 26.192135 9.458583 35.650719 108.342796 -74.238075 90.650169 32.308777 -0.867371 32.308723 -6.736107 14.241655 -0.867284 14.241763 -2.416673 -269.807007 -103.659248 2.607768 -103.659088 26.648544 -39.050777 2.607500 -39.051113 20.444244 310.304260 0.000000 0.000000 0.000000 108.342796 + 0.002600 9.521017 10.025064 7.171864 0.000000 0.000000 26.717945 8.934158 35.652103 102.335808 -70.647148 89.307579 34.406799 -2.527985 34.406590 -8.426692 15.442395 -2.528147 15.442226 -3.392471 -266.640991 -110.453896 7.683453 -110.453255 32.109047 -42.400753 7.683954 -42.400230 22.590498 305.569611 0.000000 0.000000 0.000000 102.335808 + 0.002800 9.655848 10.070871 7.241871 0.000000 0.000000 26.968590 8.683087 35.651676 99.459923 -64.661880 86.169968 36.542603 -4.670044 36.542618 -10.115946 16.754339 -4.670071 16.754400 -4.624629 -257.368988 -117.387436 14.424487 -117.387482 37.723537 -46.156158 14.424570 -46.156345 25.659809 296.013092 0.000000 0.000000 0.000000 99.459930 + 0.003000 9.574187 10.078440 7.295520 0.000000 0.000000 26.948147 8.701546 35.649693 99.671349 -56.328156 81.263550 38.710693 -7.287659 38.710857 -11.787366 18.175156 -7.287508 18.175234 -6.115178 -242.083176 -124.434883 22.810308 -124.435394 43.431976 -50.311729 22.809845 -50.311970 29.666733 281.832764 0.000000 0.000000 0.000000 99.671356 + 0.003200 9.292603 10.048754 7.332428 0.000000 0.000000 26.673786 8.971863 35.645649 102.767693 -45.755848 74.653885 40.896301 -10.354980 40.896000 -13.425131 19.697950 -10.355247 19.697805 -7.856541 -221.028076 -131.538376 32.746380 -131.537445 49.172153 -54.843410 32.747204 -54.842964 34.588383 263.313751 0.000000 0.000000 0.000000 102.767693 + 0.003400 8.840426 9.983343 7.353024 0.000000 0.000000 26.176792 9.463772 35.640564 108.402237 -33.114330 66.439392 43.082825 -13.837891 43.082539 -15.008760 21.309723 -13.838119 21.309612 -9.833526 -194.577667 -138.630875 44.101280 -138.629990 54.863708 -59.703999 44.101986 -59.703659 40.370964 240.834824 0.000000 0.000000 0.000000 108.402237 + 0.003600 8.256887 9.883842 7.357169 0.000000 0.000000 25.497896 10.136387 35.634285 116.106667 -18.601357 56.742935 45.252075 -17.693726 45.252357 -16.528818 22.998375 -17.693684 22.998606 -12.027427 -163.204819 -145.638046 56.707592 -145.638916 60.457516 -64.845512 56.707462 -64.846214 46.943230 214.810577 0.000000 0.000000 0.000000 116.106667 + 0.003800 7.589182 9.752417 7.345155 0.000000 0.000000 24.686754 10.940849 35.627602 125.321335 -2.479980 45.724091 47.386383 -21.869110 47.386292 -17.966646 24.745712 -21.869181 24.745924 -14.410080 -127.513275 -152.485901 70.357498 -152.485611 65.874069 -70.198418 70.357719 -70.199074 54.199265 185.756027 0.000000 0.000000 0.000000 125.321335 + 0.004000 6.887976 9.591535 7.317671 0.000000 0.000000 23.797182 11.823429 35.620613 135.430801 14.970699 33.562683 49.465057 -26.303497 49.465034 -19.316248 26.534473 -26.303329 26.534718 -16.950205 -88.179756 -159.091446 84.816536 -159.091385 71.072258 -75.694565 84.816017 -75.695320 62.019596 154.194290 0.000000 0.000000 0.000000 135.430801 diff --git a/pyedr/pyedr/tests/data/234_units.p b/pyedr/pyedr/tests/data/234_units.p new file mode 100644 index 0000000..9e0c84b Binary files /dev/null and b/pyedr/pyedr/tests/data/234_units.p differ diff --git a/pyedr/pyedr/tests/data/2_d.edr b/pyedr/pyedr/tests/data/2_d.edr new file mode 100644 index 0000000..0eae2d0 Binary files /dev/null and b/pyedr/pyedr/tests/data/2_d.edr differ diff --git a/pyedr/pyedr/tests/data/2_d.xvg b/pyedr/pyedr/tests/data/2_d.xvg new file mode 100644 index 0000000..dcb2b1b --- /dev/null +++ b/pyedr/pyedr/tests/data/2_d.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 16:10:22 2022 +# by the following command: +# g_energy -f 2_d.edr -o 2_d.xvg +# +# g_energy is part of G R O M A C S: +# +# GRoups of Organic Molecules in ACtion for Science +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247461 6.340121 5.023643 0.000000 0.000000 11.611225 23.976967 35.588192 274.642808 19.497690 1.011761 9.334921 -7.721660 9.334921 6.738469 5.942023 -7.721660 5.942023 -2.693344 33.679072 -29.047133 26.974417 -29.047133 -7.063831 -17.232533 26.974417 -17.232533 31.877829 40.573678 0.000000 0.000000 0.000000 274.642808 + 0.000200 0.327335 6.765546 5.246335 0.000000 0.000000 12.339216 23.249712 35.588928 266.312502 7.363049 12.196398 11.298821 -6.420675 11.298821 6.446207 6.491961 -6.420675 6.491961 -2.537816 -1.719337 -35.556213 23.377157 -35.556213 -7.373249 -19.023363 23.377157 -19.023363 31.181732 78.061449 0.000000 0.000000 0.000000 266.312502 + 0.000400 0.642561 7.180591 5.463817 0.000000 0.000000 13.286968 22.304386 35.591355 255.484323 -4.902381 23.391609 13.213221 -5.047508 13.213221 5.962883 7.018881 -5.047508 7.018881 -2.292955 -37.702857 -41.884055 19.336823 -41.884055 -7.018587 -20.629067 19.336823 -20.629067 30.014301 114.433141 0.000000 0.000000 0.000000 255.484323 + 0.000600 1.180058 7.580718 5.674731 0.000000 0.000000 14.435507 21.159866 35.595373 242.374478 -17.035301 34.384013 15.090483 -3.663155 15.090483 5.295771 7.536400 -3.663155 7.536400 -1.989280 -73.565343 -48.060268 15.050237 -48.060268 -6.018854 -22.094610 15.050237 -22.094610 28.478296 149.162621 0.000000 0.000000 0.000000 242.374478 + 0.000800 1.913669 7.961694 5.877770 0.000000 0.000000 15.753133 19.847647 35.600781 227.343747 -28.754475 44.955933 16.943579 -2.331433 16.943579 4.454802 8.059319 -2.331433 8.059319 -1.660448 -108.559169 -54.121816 10.734967 -54.121816 -4.398439 -23.473842 10.734967 -23.473842 26.694182 181.722996 0.000000 0.000000 0.000000 227.343747 + 0.001000 2.805711 8.319640 6.071682 0.000000 0.000000 17.197033 18.410252 35.607285 210.879180 -39.767535 54.889932 18.785734 -1.117497 18.785734 3.452168 8.603245 -1.117497 8.603245 -1.342404 -141.913214 -60.111479 6.623471 -60.111479 -2.186103 -24.827830 6.623471 -24.827830 24.796712 211.597700 0.000000 0.000000 0.000000 210.879180 + 0.001200 3.809268 8.651058 6.255286 0.000000 0.000000 18.715613 16.898907 35.614519 193.567563 -49.779080 63.973719 20.629977 -0.086176 20.629977 2.301962 9.184138 -0.086176 9.184138 -1.072373 -172.853490 -66.075675 2.955999 -66.075675 0.585600 -26.222631 2.955999 -26.222631 22.930651 238.293058 0.000000 0.000000 0.000000 193.567563 + 0.001400 4.871063 8.952868 6.427482 0.000000 0.000000 20.251412 15.370659 35.622071 176.062333 -58.499735 72.005253 22.488633 0.699811 22.488633 1.019865 9.817774 0.699811 9.817774 -0.887748 -200.625578 -72.061796 -0.027450 -72.061796 3.880540 -27.726617 -0.027450 -27.726617 21.245833 261.351746 0.000000 0.000000 0.000000 176.062333 + 0.001600 5.934733 9.222418 6.587257 0.000000 0.000000 21.744408 13.885091 35.629500 159.045990 -65.655738 78.797870 24.372779 1.181701 24.372779 -0.377140 10.519177 1.181701 10.519177 -0.824916 -224.517906 -78.115230 -2.095748 -78.115230 7.658949 -29.407499 -2.095748 -29.407499 19.891743 280.366473 0.000000 0.000000 0.000000 159.045990 + 0.001800 6.944309 9.457507 6.733698 0.000000 0.000000 23.135514 12.500859 35.636373 143.190382 -70.998580 84.185236 26.291696 1.306519 26.291696 -1.871030 11.302038 1.306519 11.302038 -0.918060 -243.884822 -84.276269 -3.035416 -84.276269 11.877182 -31.329219 -3.035416 -31.329219 19.011899 294.993146 0.000000 0.000000 0.000000 143.190382 + 0.002000 7.847650 9.656387 6.865998 0.000000 0.000000 24.370035 11.272254 35.642289 129.117392 -74.314216 88.025929 28.252351 1.028798 28.252351 -3.442987 12.178139 1.028798 12.178139 -1.197990 -258.168362 -90.577117 -2.659120 -90.577117 16.487438 -33.548897 -2.659120 -33.548897 18.738276 304.962795 0.000000 0.000000 0.000000 129.117392 + 0.002200 8.599650 9.817769 6.983460 0.000000 0.000000 25.400879 10.246023 35.646902 117.362488 -75.431350 90.207466 30.258945 0.312144 30.258945 -5.073651 13.156835 0.312144 13.156835 -1.691054 -266.917669 -97.039212 -0.813433 -97.039212 21.437552 -36.113995 -0.813433 -36.113995 19.186065 310.091552 0.000000 0.000000 0.000000 117.362488 + 0.002400 9.164976 9.940825 7.085504 0.000000 0.000000 26.191305 9.458642 35.649947 108.343481 -74.228364 90.649595 32.312551 -0.869457 32.312551 -6.743388 14.244605 -0.869457 14.244605 -2.418176 -269.805093 -103.671035 2.614525 -103.671035 26.670986 -39.059877 2.614525 -39.059877 20.449015 310.288071 0.000000 0.000000 0.000000 108.343481 + 0.002600 9.520190 10.025179 7.171673 0.000000 0.000000 26.717041 8.934214 35.651255 102.336442 -70.638498 89.306720 34.410875 -2.530636 34.410875 -8.432576 15.444697 -2.530636 15.444697 -3.394060 -266.638178 -110.466582 7.691949 -110.466582 32.127104 -42.407897 7.691949 -42.407897 22.595581 305.557913 0.000000 0.000000 0.000000 102.336442 + 0.002800 9.655107 10.070905 7.241629 0.000000 0.000000 26.967641 8.683123 35.650763 99.460334 -64.653003 86.169342 36.548149 -4.673992 36.548149 -10.121933 16.756897 -4.673992 16.756897 -4.626594 -257.366916 -117.404605 14.436976 -117.404605 37.741824 -46.164139 14.436976 -46.164139 25.666082 296.004548 0.000000 0.000000 0.000000 99.460334 + 0.003000 9.573303 10.078517 7.295159 0.000000 0.000000 26.946979 8.701541 35.648520 99.671305 -56.322086 81.264466 38.715172 -7.289832 38.715172 -11.792868 18.177421 -7.289832 18.177421 -6.116483 -242.085904 -124.448683 22.817269 -124.448683 43.448656 -50.318858 22.817269 -50.318858 29.670990 281.826830 0.000000 0.000000 0.000000 99.671305 + 0.003200 9.291753 10.048953 7.332172 0.000000 0.000000 26.672878 8.971803 35.644681 102.767002 -45.753570 74.654935 40.899502 -10.356306 40.899502 -13.427867 19.698943 -10.356306 19.698943 -7.857121 -221.031286 -131.548155 32.750644 -131.548155 49.180149 -54.846665 32.750644 -54.846665 34.590427 263.312989 0.000000 0.000000 0.000000 102.767002 + 0.003400 8.839606 9.983562 7.352698 0.000000 0.000000 26.175866 9.463632 35.639498 108.400635 -33.109349 66.437738 43.085779 -13.839945 43.085779 -15.010896 21.310756 -13.839945 21.310756 -9.834707 -194.572630 -138.639838 44.107696 -138.639838 54.869696 -59.707441 44.107696 -59.707441 40.374886 240.831358 0.000000 0.000000 0.000000 108.400635 + 0.003600 8.256199 9.884087 7.356879 0.000000 0.000000 25.497166 10.136141 35.633307 116.103850 -18.599809 56.741351 45.256178 -17.696565 45.256178 -16.527814 22.999053 -17.696565 22.999053 -12.028596 -163.200158 -145.650466 56.716305 -145.650466 60.453615 -64.847897 56.716305 -64.847897 46.947116 214.818249 0.000000 0.000000 0.000000 116.103850 + 0.003800 7.588418 9.752642 7.344972 0.000000 0.000000 24.686032 10.940469 35.626500 125.316974 -2.476496 45.722232 47.390959 -21.872499 47.390959 -17.966767 24.747314 -21.872499 24.747314 -14.411865 -127.507954 -152.499680 70.367767 -152.499680 65.873418 -70.203703 70.367767 -70.203703 54.205046 185.763554 0.000000 0.000000 0.000000 125.316974 + 0.004000 6.887594 9.591687 7.317333 0.000000 0.000000 23.796614 11.822893 35.619507 135.424660 14.976571 33.560620 49.469077 -26.306107 49.469077 -19.318554 26.536777 -26.306107 26.536777 -16.952070 -88.173993 -159.103402 84.824229 -159.103402 71.078102 -75.702045 84.824229 -75.702045 62.025605 154.194741 0.000000 0.000000 0.000000 135.424660 diff --git a/pyedr/pyedr/tests/data/3.edr b/pyedr/pyedr/tests/data/3.edr new file mode 100644 index 0000000..1eac614 Binary files /dev/null and b/pyedr/pyedr/tests/data/3.edr differ diff --git a/pyedr/pyedr/tests/data/3.xvg b/pyedr/pyedr/tests/data/3.xvg new file mode 100644 index 0000000..cf45922 --- /dev/null +++ b/pyedr/pyedr/tests/data/3.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 16:01:40 2022 +# by the following command: +# g_energy -f 3.edr -o 3.xvg +# +# g_energy is part of G R O M A C S: +# +# GRoups of Organic Molecules in ACtion for Science +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247460 6.340124 5.023643 0.000000 0.000000 11.611227 23.976969 35.588196 274.642822 19.498146 1.011566 9.335022 -7.721710 9.334869 6.738281 5.942154 -7.721634 5.942215 -2.693401 33.679680 -29.047447 26.974573 -29.046974 -7.063252 -17.232939 26.974339 -17.233128 31.878010 40.572777 0.000000 0.000000 0.000000 274.642822 + 0.000200 0.327348 6.765538 5.246381 0.000000 0.000000 12.339266 23.249716 35.588982 266.312561 7.368440 12.192596 11.298157 -6.421539 11.298294 6.445557 6.492653 -6.421494 6.492622 -2.538591 -1.707564 -35.554150 23.379818 -35.554577 -7.371249 -19.025509 23.379677 -19.025414 31.184134 78.051651 0.000000 0.000000 0.000000 266.312561 + 0.000400 0.642608 7.180584 5.463929 0.000000 0.000000 13.287121 22.304394 35.591515 255.484406 -4.897089 23.384705 13.210754 -5.048309 13.210739 5.965134 7.018417 -5.048325 7.018345 -2.293430 -37.681473 -41.876396 19.339258 -41.876350 -7.025577 -20.627657 19.339306 -20.627432 30.015785 114.420662 0.000000 0.000000 0.000000 255.484406 + 0.000600 1.180128 7.580680 5.674896 0.000000 0.000000 14.435704 21.159878 35.595581 242.374634 -17.028572 34.376724 15.088745 -3.664551 15.088776 5.297314 7.536354 -3.664490 7.536347 -1.990051 -73.542747 -48.054840 15.054485 -48.054935 -6.023676 -22.094505 15.054296 -22.094484 28.480703 149.148468 0.000000 0.000000 0.000000 242.374619 + 0.000800 1.913714 7.961715 5.878052 0.000000 0.000000 15.753481 19.847660 35.601143 227.343887 -28.750597 44.949066 16.940857 -2.332214 16.940887 4.458111 8.058395 -2.332184 8.058388 -1.660645 -108.537857 -54.113331 10.737302 -54.113426 -4.408744 -23.471024 10.737207 -23.471001 26.694809 181.712341 0.000000 0.000000 0.000000 227.343887 + 0.001000 2.805694 8.319744 6.072119 0.000000 0.000000 17.197557 18.410267 35.607826 210.879349 -39.764801 54.881668 18.781616 -1.117798 18.781296 3.457542 8.601669 -1.117767 8.601753 -1.342155 -141.887543 -60.098652 6.624294 -60.097660 -2.202821 -24.822998 6.624199 -24.823257 24.795956 211.586258 0.000000 0.000000 0.000000 210.879349 + 0.001200 3.809224 8.651253 6.255602 0.000000 0.000000 18.716080 16.898928 35.615005 193.567810 -49.778164 63.966064 20.625854 -0.086426 20.625931 2.308487 9.182236 -0.086395 9.182236 -1.072121 -172.829681 -66.062813 2.956633 -66.063049 0.565313 -26.216810 2.956538 -26.216810 22.929886 238.287537 0.000000 0.000000 0.000000 193.567810 + 0.001400 4.871185 8.952931 6.427723 0.000000 0.000000 20.251839 15.370678 35.622517 176.062561 -58.497906 71.999557 22.484924 0.700256 22.484970 1.023773 9.816757 0.700256 9.816833 -0.887726 -200.607834 -72.050209 -0.029000 -72.050354 3.868346 -27.723553 -0.029000 -27.723789 21.245777 261.345551 0.000000 0.000000 0.000000 176.062561 + 0.001600 5.935040 9.222473 6.587517 0.000000 0.000000 21.745029 13.885092 35.630119 159.045990 -65.655861 78.792145 24.369934 1.181305 24.370209 -0.371124 10.517349 1.181396 10.517715 -0.825089 -224.500122 -78.106308 -2.094730 -78.107155 7.640254 -29.401922 -2.095014 -29.403053 19.892269 280.368622 0.000000 0.000000 0.000000 159.045990 + 0.001800 6.944663 9.457582 6.733921 0.000000 0.000000 23.136166 12.500838 35.637005 143.190140 -71.001320 84.179626 26.286743 1.308197 26.286331 -1.863708 11.299820 1.307915 11.299835 -0.917145 -243.867477 -84.260834 -3.040858 -84.259560 11.854479 -31.322433 -3.039986 -31.322481 19.009043 294.992767 0.000000 0.000000 0.000000 143.190140 + 0.002000 7.848146 9.656350 6.866268 0.000000 0.000000 24.370766 11.272213 35.642979 129.116928 -74.318062 88.022202 28.248108 1.029572 28.248291 -3.436157 12.175568 1.029572 12.175781 -1.197418 -258.156921 -90.563873 -2.661803 -90.564438 16.466295 -33.541019 -2.661803 -33.541679 18.736456 304.969421 0.000000 0.000000 0.000000 129.116928 + 0.002200 8.600093 9.817728 6.983737 0.000000 0.000000 25.401556 10.245968 35.647522 117.361855 -75.436630 90.203690 30.255005 0.312531 30.255310 -5.065552 13.154144 0.312469 13.153961 -1.690308 -266.906097 -97.026909 -0.814935 -97.027847 21.412529 -36.105728 -0.814746 -36.105164 19.183670 310.101013 0.000000 0.000000 0.000000 117.361855 + 0.002400 9.165542 9.940764 7.085781 0.000000 0.000000 26.192087 9.458583 35.650669 108.342796 -74.238396 90.650482 32.308777 -0.867279 32.308594 -6.736237 14.241730 -0.867386 14.241760 -2.416550 -269.807983 -103.659248 2.607484 -103.658684 26.648945 -39.051010 2.607814 -39.051102 20.443861 310.304047 0.000000 0.000000 0.000000 108.342796 + 0.002600 9.521039 10.025064 7.171885 0.000000 0.000000 26.717991 8.934158 35.652149 102.335808 -70.646873 89.307281 34.406799 -2.528076 34.406891 -8.426666 15.442322 -2.528282 15.442200 -3.392471 -266.640076 -110.453896 7.683736 -110.454178 32.108967 -42.400528 7.684373 -42.400150 22.590502 305.568695 0.000000 0.000000 0.000000 102.335808 + 0.002800 9.655821 10.070872 7.241860 0.000000 0.000000 26.968552 8.683086 35.651638 99.459915 -64.661247 86.169708 36.542664 -4.669952 36.542435 -10.116272 16.754578 -4.669983 16.754425 -4.624664 -257.368195 -117.387611 14.424204 -117.386909 37.724541 -46.156895 14.424298 -46.156422 25.659918 296.011353 0.000000 0.000000 0.000000 99.459915 + 0.003000 9.574196 10.078440 7.295506 0.000000 0.000000 26.948143 8.701544 35.649689 99.671341 -56.328079 81.263474 38.711060 -7.287598 38.711182 -11.787384 18.175201 -7.287537 18.175262 -6.115158 -242.082932 -124.436012 22.810120 -124.436394 43.432030 -50.311871 22.809933 -50.312061 29.666672 281.832306 0.000000 0.000000 0.000000 99.671341 + 0.003200 9.292592 10.048754 7.332439 0.000000 0.000000 26.673786 8.971862 35.645649 102.767685 -45.755939 74.653946 40.896423 -10.355072 40.896545 -13.425079 19.698090 -10.354912 19.698029 -7.856567 -221.028275 -131.538757 32.746662 -131.539124 49.171993 -54.843842 32.746166 -54.843655 34.588463 263.314301 0.000000 0.000000 0.000000 102.767677 + 0.003400 8.840415 9.983343 7.353025 0.000000 0.000000 26.176783 9.463769 35.640553 108.402206 -33.114288 66.439423 43.082520 -13.837708 43.082504 -15.008789 21.309540 -13.838058 21.309509 -9.833572 -194.577759 -138.629944 44.100716 -138.629898 54.863789 -59.703434 44.101799 -59.703339 40.371109 240.835159 0.000000 0.000000 0.000000 108.402206 + 0.003600 8.256898 9.883842 7.357162 0.000000 0.000000 25.497902 10.136384 35.634285 116.106628 -18.601248 56.742950 45.252075 -17.693634 45.252060 -16.529022 22.998474 -17.693680 22.998474 -12.027344 -163.204865 -145.638046 56.707302 -145.638000 60.458141 -64.845810 56.707447 -64.845810 46.942974 214.809387 0.000000 0.000000 0.000000 116.106636 + 0.003800 7.589183 9.752417 7.345162 0.000000 0.000000 24.686760 10.940846 35.627605 125.321304 -2.479956 45.724121 47.386475 -21.869232 47.386200 -17.966675 24.745697 -21.869102 24.746048 -14.410110 -127.513382 -152.486176 70.357880 -152.485321 65.874153 -70.198372 70.357475 -70.199455 54.199360 185.756256 0.000000 0.000000 0.000000 125.321304 + 0.004000 6.887959 9.591536 7.317657 0.000000 0.000000 23.797153 11.823425 35.620579 135.430756 14.970412 33.562836 49.464783 -26.303223 49.464874 -19.316223 26.534393 -26.303307 26.534454 -16.950104 -88.180229 -159.090607 84.815681 -159.090881 71.072182 -75.694321 84.815941 -75.694511 62.019283 154.194214 0.000000 0.000000 0.000000 135.430756 diff --git a/pyedr/pyedr/tests/data/3_d.edr b/pyedr/pyedr/tests/data/3_d.edr new file mode 100644 index 0000000..e871c59 Binary files /dev/null and b/pyedr/pyedr/tests/data/3_d.edr differ diff --git a/pyedr/pyedr/tests/data/3_d.xvg b/pyedr/pyedr/tests/data/3_d.xvg new file mode 100644 index 0000000..ab4989b --- /dev/null +++ b/pyedr/pyedr/tests/data/3_d.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 16:02:32 2022 +# by the following command: +# g_energy -f 3_d.edr -o 3_d.xvg +# +# g_energy is part of G R O M A C S: +# +# Good ROcking Metal Altar for Chronical Sinners +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247461 6.340121 5.023643 0.000000 0.000000 11.611225 23.976967 35.588192 274.642808 19.497690 1.011761 9.334921 -7.721660 9.334921 6.738469 5.942023 -7.721660 5.942023 -2.693344 33.679072 -29.047133 26.974417 -29.047133 -7.063831 -17.232533 26.974417 -17.232533 31.877829 40.573678 0.000000 0.000000 0.000000 274.642808 + 0.000200 0.327335 6.765546 5.246335 0.000000 0.000000 12.339216 23.249712 35.588928 266.312502 7.363049 12.196398 11.298821 -6.420675 11.298821 6.446207 6.491961 -6.420675 6.491961 -2.537816 -1.719337 -35.556213 23.377157 -35.556213 -7.373249 -19.023363 23.377157 -19.023363 31.181732 78.061449 0.000000 0.000000 0.000000 266.312502 + 0.000400 0.642561 7.180591 5.463817 0.000000 0.000000 13.286968 22.304386 35.591355 255.484323 -4.902381 23.391609 13.213221 -5.047508 13.213221 5.962883 7.018881 -5.047508 7.018881 -2.292955 -37.702857 -41.884055 19.336823 -41.884055 -7.018587 -20.629067 19.336823 -20.629067 30.014301 114.433141 0.000000 0.000000 0.000000 255.484323 + 0.000600 1.180058 7.580718 5.674731 0.000000 0.000000 14.435507 21.159866 35.595373 242.374478 -17.035301 34.384013 15.090483 -3.663155 15.090483 5.295771 7.536400 -3.663155 7.536400 -1.989280 -73.565343 -48.060268 15.050237 -48.060268 -6.018854 -22.094610 15.050237 -22.094610 28.478296 149.162621 0.000000 0.000000 0.000000 242.374478 + 0.000800 1.913669 7.961694 5.877770 0.000000 0.000000 15.753133 19.847647 35.600781 227.343747 -28.754475 44.955933 16.943579 -2.331433 16.943579 4.454802 8.059319 -2.331433 8.059319 -1.660448 -108.559169 -54.121816 10.734967 -54.121816 -4.398439 -23.473842 10.734967 -23.473842 26.694182 181.722996 0.000000 0.000000 0.000000 227.343747 + 0.001000 2.805711 8.319640 6.071682 0.000000 0.000000 17.197033 18.410252 35.607285 210.879180 -39.767535 54.889932 18.785734 -1.117497 18.785734 3.452168 8.603245 -1.117497 8.603245 -1.342404 -141.913214 -60.111479 6.623471 -60.111479 -2.186103 -24.827830 6.623471 -24.827830 24.796712 211.597700 0.000000 0.000000 0.000000 210.879180 + 0.001200 3.809268 8.651058 6.255286 0.000000 0.000000 18.715613 16.898907 35.614519 193.567563 -49.779080 63.973719 20.629977 -0.086176 20.629977 2.301962 9.184138 -0.086176 9.184138 -1.072373 -172.853490 -66.075675 2.955999 -66.075675 0.585600 -26.222631 2.955999 -26.222631 22.930651 238.293058 0.000000 0.000000 0.000000 193.567563 + 0.001400 4.871063 8.952868 6.427482 0.000000 0.000000 20.251412 15.370659 35.622071 176.062333 -58.499735 72.005253 22.488633 0.699811 22.488633 1.019865 9.817774 0.699811 9.817774 -0.887748 -200.625578 -72.061796 -0.027450 -72.061796 3.880540 -27.726617 -0.027450 -27.726617 21.245833 261.351746 0.000000 0.000000 0.000000 176.062333 + 0.001600 5.934733 9.222418 6.587257 0.000000 0.000000 21.744408 13.885091 35.629500 159.045990 -65.655738 78.797870 24.372779 1.181701 24.372779 -0.377140 10.519177 1.181701 10.519177 -0.824916 -224.517906 -78.115230 -2.095748 -78.115230 7.658949 -29.407499 -2.095748 -29.407499 19.891743 280.366473 0.000000 0.000000 0.000000 159.045990 + 0.001800 6.944309 9.457507 6.733698 0.000000 0.000000 23.135514 12.500859 35.636373 143.190382 -70.998580 84.185236 26.291696 1.306519 26.291696 -1.871030 11.302038 1.306519 11.302038 -0.918060 -243.884822 -84.276269 -3.035416 -84.276269 11.877182 -31.329219 -3.035416 -31.329219 19.011899 294.993146 0.000000 0.000000 0.000000 143.190382 + 0.002000 7.847650 9.656387 6.865998 0.000000 0.000000 24.370035 11.272254 35.642289 129.117392 -74.314216 88.025929 28.252351 1.028798 28.252351 -3.442987 12.178139 1.028798 12.178139 -1.197990 -258.168362 -90.577117 -2.659120 -90.577117 16.487438 -33.548897 -2.659120 -33.548897 18.738276 304.962795 0.000000 0.000000 0.000000 129.117392 + 0.002200 8.599650 9.817769 6.983460 0.000000 0.000000 25.400879 10.246023 35.646902 117.362488 -75.431350 90.207466 30.258945 0.312144 30.258945 -5.073651 13.156835 0.312144 13.156835 -1.691054 -266.917669 -97.039212 -0.813433 -97.039212 21.437552 -36.113995 -0.813433 -36.113995 19.186065 310.091552 0.000000 0.000000 0.000000 117.362488 + 0.002400 9.164976 9.940825 7.085504 0.000000 0.000000 26.191305 9.458642 35.649947 108.343481 -74.228364 90.649595 32.312551 -0.869457 32.312551 -6.743388 14.244605 -0.869457 14.244605 -2.418176 -269.805093 -103.671035 2.614525 -103.671035 26.670986 -39.059877 2.614525 -39.059877 20.449015 310.288071 0.000000 0.000000 0.000000 108.343481 + 0.002600 9.520190 10.025179 7.171673 0.000000 0.000000 26.717041 8.934214 35.651255 102.336442 -70.638498 89.306720 34.410875 -2.530636 34.410875 -8.432576 15.444697 -2.530636 15.444697 -3.394060 -266.638178 -110.466582 7.691949 -110.466582 32.127104 -42.407897 7.691949 -42.407897 22.595581 305.557913 0.000000 0.000000 0.000000 102.336442 + 0.002800 9.655107 10.070905 7.241629 0.000000 0.000000 26.967641 8.683123 35.650763 99.460334 -64.653003 86.169342 36.548149 -4.673992 36.548149 -10.121933 16.756897 -4.673992 16.756897 -4.626594 -257.366916 -117.404605 14.436976 -117.404605 37.741824 -46.164139 14.436976 -46.164139 25.666082 296.004548 0.000000 0.000000 0.000000 99.460334 + 0.003000 9.573303 10.078517 7.295159 0.000000 0.000000 26.946979 8.701541 35.648520 99.671305 -56.322086 81.264466 38.715172 -7.289832 38.715172 -11.792868 18.177421 -7.289832 18.177421 -6.116483 -242.085904 -124.448683 22.817269 -124.448683 43.448656 -50.318858 22.817269 -50.318858 29.670990 281.826830 0.000000 0.000000 0.000000 99.671305 + 0.003200 9.291753 10.048953 7.332172 0.000000 0.000000 26.672878 8.971803 35.644681 102.767002 -45.753570 74.654935 40.899502 -10.356306 40.899502 -13.427867 19.698943 -10.356306 19.698943 -7.857121 -221.031286 -131.548155 32.750644 -131.548155 49.180149 -54.846665 32.750644 -54.846665 34.590427 263.312989 0.000000 0.000000 0.000000 102.767002 + 0.003400 8.839606 9.983562 7.352698 0.000000 0.000000 26.175866 9.463632 35.639498 108.400635 -33.109349 66.437738 43.085779 -13.839945 43.085779 -15.010896 21.310756 -13.839945 21.310756 -9.834707 -194.572630 -138.639838 44.107696 -138.639838 54.869696 -59.707441 44.107696 -59.707441 40.374886 240.831358 0.000000 0.000000 0.000000 108.400635 + 0.003600 8.256199 9.884087 7.356879 0.000000 0.000000 25.497166 10.136141 35.633307 116.103850 -18.599809 56.741351 45.256178 -17.696565 45.256178 -16.527814 22.999053 -17.696565 22.999053 -12.028596 -163.200158 -145.650466 56.716305 -145.650466 60.453615 -64.847897 56.716305 -64.847897 46.947116 214.818249 0.000000 0.000000 0.000000 116.103850 + 0.003800 7.588418 9.752642 7.344972 0.000000 0.000000 24.686032 10.940469 35.626500 125.316974 -2.476496 45.722232 47.390959 -21.872499 47.390959 -17.966767 24.747314 -21.872499 24.747314 -14.411865 -127.507954 -152.499680 70.367767 -152.499680 65.873418 -70.203703 70.367767 -70.203703 54.205046 185.763554 0.000000 0.000000 0.000000 125.316974 + 0.004000 6.887594 9.591687 7.317333 0.000000 0.000000 23.796614 11.822893 35.619507 135.424660 14.976571 33.560620 49.469077 -26.306107 49.469077 -19.318554 26.536777 -26.306107 26.536777 -16.952070 -88.173993 -159.103402 84.824229 -159.103402 71.078102 -75.702045 84.824229 -75.702045 62.025605 154.194741 0.000000 0.000000 0.000000 135.424660 diff --git a/pyedr/pyedr/tests/data/4.edr b/pyedr/pyedr/tests/data/4.edr new file mode 100644 index 0000000..9e6ec16 Binary files /dev/null and b/pyedr/pyedr/tests/data/4.edr differ diff --git a/pyedr/pyedr/tests/data/4.xvg b/pyedr/pyedr/tests/data/4.xvg new file mode 100644 index 0000000..b437793 --- /dev/null +++ b/pyedr/pyedr/tests/data/4.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 14:56:07 2022 +# by the following command: +# g_energy -f 4.edr -o 4.xvg +# +# g_energy is part of G R O M A C S: +# +# S C A M O R G +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247460 6.340124 5.023643 0.000000 0.000000 11.611227 23.976969 35.588196 274.642822 19.498146 1.011566 9.335022 -7.721710 9.334869 6.738281 5.942154 -7.721634 5.942215 -2.693401 33.679680 -29.047447 26.974573 -29.046974 -7.063252 -17.232939 26.974339 -17.233128 31.878010 40.572777 0.000000 0.000000 0.000000 274.642822 + 0.000200 0.327348 6.765538 5.246381 0.000000 0.000000 12.339266 23.249716 35.588982 266.312561 7.368440 12.192596 11.298157 -6.421539 11.298294 6.445557 6.492653 -6.421494 6.492622 -2.538591 -1.707564 -35.554150 23.379818 -35.554577 -7.371249 -19.025509 23.379677 -19.025414 31.184134 78.051651 0.000000 0.000000 0.000000 266.312561 + 0.000400 0.642608 7.180584 5.463929 0.000000 0.000000 13.287121 22.304394 35.591515 255.484406 -4.897089 23.384705 13.210754 -5.048309 13.210739 5.965134 7.018417 -5.048325 7.018345 -2.293430 -37.681473 -41.876396 19.339258 -41.876350 -7.025577 -20.627657 19.339306 -20.627432 30.015785 114.420662 0.000000 0.000000 0.000000 255.484406 + 0.000600 1.180128 7.580680 5.674896 0.000000 0.000000 14.435704 21.159878 35.595581 242.374634 -17.028572 34.376724 15.088745 -3.664551 15.088776 5.297314 7.536354 -3.664490 7.536347 -1.990051 -73.542747 -48.054840 15.054485 -48.054935 -6.023676 -22.094505 15.054296 -22.094484 28.480703 149.148468 0.000000 0.000000 0.000000 242.374619 + 0.000800 1.913714 7.961715 5.878052 0.000000 0.000000 15.753481 19.847660 35.601143 227.343887 -28.750597 44.949066 16.940857 -2.332214 16.940887 4.458111 8.058395 -2.332184 8.058388 -1.660645 -108.537857 -54.113331 10.737302 -54.113426 -4.408744 -23.471024 10.737207 -23.471001 26.694809 181.712341 0.000000 0.000000 0.000000 227.343887 + 0.001000 2.805694 8.319744 6.072119 0.000000 0.000000 17.197557 18.410267 35.607826 210.879349 -39.764801 54.881668 18.781616 -1.117798 18.781296 3.457542 8.601669 -1.117767 8.601753 -1.342155 -141.887543 -60.098652 6.624294 -60.097660 -2.202821 -24.822998 6.624199 -24.823257 24.795956 211.586258 0.000000 0.000000 0.000000 210.879349 + 0.001200 3.809224 8.651253 6.255602 0.000000 0.000000 18.716080 16.898928 35.615005 193.567810 -49.778164 63.966064 20.625854 -0.086426 20.625931 2.308487 9.182236 -0.086395 9.182236 -1.072121 -172.829681 -66.062813 2.956633 -66.063049 0.565313 -26.216810 2.956538 -26.216810 22.929886 238.287537 0.000000 0.000000 0.000000 193.567810 + 0.001400 4.871185 8.952931 6.427723 0.000000 0.000000 20.251839 15.370678 35.622517 176.062561 -58.497906 71.999557 22.484924 0.700256 22.484970 1.023773 9.816757 0.700256 9.816833 -0.887726 -200.607834 -72.050209 -0.029000 -72.050354 3.868346 -27.723553 -0.029000 -27.723789 21.245777 261.345551 0.000000 0.000000 0.000000 176.062561 + 0.001600 5.935040 9.222473 6.587517 0.000000 0.000000 21.745029 13.885092 35.630119 159.045990 -65.655861 78.792145 24.369934 1.181305 24.370209 -0.371124 10.517349 1.181396 10.517715 -0.825089 -224.500122 -78.106308 -2.094730 -78.107155 7.640254 -29.401922 -2.095014 -29.403053 19.892269 280.368622 0.000000 0.000000 0.000000 159.045990 + 0.001800 6.944663 9.457582 6.733921 0.000000 0.000000 23.136166 12.500838 35.637005 143.190140 -71.001320 84.179626 26.286743 1.308197 26.286331 -1.863708 11.299820 1.307915 11.299835 -0.917145 -243.867477 -84.260834 -3.040858 -84.259560 11.854479 -31.322433 -3.039986 -31.322481 19.009043 294.992767 0.000000 0.000000 0.000000 143.190140 + 0.002000 7.848146 9.656350 6.866268 0.000000 0.000000 24.370766 11.272213 35.642979 129.116928 -74.318062 88.022202 28.248108 1.029572 28.248291 -3.436157 12.175568 1.029572 12.175781 -1.197418 -258.156921 -90.563873 -2.661803 -90.564438 16.466295 -33.541019 -2.661803 -33.541679 18.736456 304.969421 0.000000 0.000000 0.000000 129.116928 + 0.002200 8.600093 9.817728 6.983737 0.000000 0.000000 25.401556 10.245968 35.647522 117.361855 -75.436630 90.203690 30.255005 0.312531 30.255310 -5.065552 13.154144 0.312469 13.153961 -1.690308 -266.906097 -97.026909 -0.814935 -97.027847 21.412529 -36.105728 -0.814746 -36.105164 19.183670 310.101013 0.000000 0.000000 0.000000 117.361855 + 0.002400 9.165542 9.940764 7.085781 0.000000 0.000000 26.192087 9.458583 35.650669 108.342796 -74.238396 90.650482 32.308777 -0.867279 32.308594 -6.736237 14.241730 -0.867386 14.241760 -2.416550 -269.807983 -103.659248 2.607484 -103.658684 26.648945 -39.051010 2.607814 -39.051102 20.443861 310.304047 0.000000 0.000000 0.000000 108.342796 + 0.002600 9.521039 10.025064 7.171885 0.000000 0.000000 26.717991 8.934158 35.652149 102.335808 -70.646873 89.307281 34.406799 -2.528076 34.406891 -8.426666 15.442322 -2.528282 15.442200 -3.392471 -266.640076 -110.453896 7.683736 -110.454178 32.108967 -42.400528 7.684373 -42.400150 22.590502 305.568695 0.000000 0.000000 0.000000 102.335808 + 0.002800 9.655821 10.070872 7.241860 0.000000 0.000000 26.968552 8.683086 35.651638 99.459915 -64.661247 86.169708 36.542664 -4.669952 36.542435 -10.116272 16.754578 -4.669983 16.754425 -4.624664 -257.368195 -117.387611 14.424204 -117.386909 37.724541 -46.156895 14.424298 -46.156422 25.659918 296.011353 0.000000 0.000000 0.000000 99.459915 + 0.003000 9.574196 10.078440 7.295506 0.000000 0.000000 26.948143 8.701544 35.649689 99.671341 -56.328079 81.263474 38.711060 -7.287598 38.711182 -11.787384 18.175201 -7.287537 18.175262 -6.115158 -242.082932 -124.436012 22.810120 -124.436394 43.432030 -50.311871 22.809933 -50.312061 29.666672 281.832306 0.000000 0.000000 0.000000 99.671341 + 0.003200 9.292592 10.048754 7.332439 0.000000 0.000000 26.673786 8.971862 35.645649 102.767685 -45.755939 74.653946 40.896423 -10.355072 40.896545 -13.425079 19.698090 -10.354912 19.698029 -7.856567 -221.028275 -131.538757 32.746662 -131.539124 49.171993 -54.843842 32.746166 -54.843655 34.588463 263.314301 0.000000 0.000000 0.000000 102.767677 + 0.003400 8.840415 9.983343 7.353025 0.000000 0.000000 26.176783 9.463769 35.640553 108.402206 -33.114288 66.439423 43.082520 -13.837708 43.082504 -15.008789 21.309540 -13.838058 21.309509 -9.833572 -194.577759 -138.629944 44.100716 -138.629898 54.863789 -59.703434 44.101799 -59.703339 40.371109 240.835159 0.000000 0.000000 0.000000 108.402206 + 0.003600 8.256898 9.883842 7.357162 0.000000 0.000000 25.497902 10.136384 35.634285 116.106628 -18.601248 56.742950 45.252075 -17.693634 45.252060 -16.529022 22.998474 -17.693680 22.998474 -12.027344 -163.204865 -145.638046 56.707302 -145.638000 60.458141 -64.845810 56.707447 -64.845810 46.942974 214.809387 0.000000 0.000000 0.000000 116.106636 + 0.003800 7.589183 9.752417 7.345162 0.000000 0.000000 24.686760 10.940846 35.627605 125.321304 -2.479956 45.724121 47.386475 -21.869232 47.386200 -17.966675 24.745697 -21.869102 24.746048 -14.410110 -127.513382 -152.486176 70.357880 -152.485321 65.874153 -70.198372 70.357475 -70.199455 54.199360 185.756256 0.000000 0.000000 0.000000 125.321304 + 0.004000 6.887959 9.591536 7.317657 0.000000 0.000000 23.797153 11.823425 35.620579 135.430756 14.970412 33.562836 49.464783 -26.303223 49.464874 -19.316223 26.534393 -26.303307 26.534454 -16.950104 -88.180229 -159.090607 84.815681 -159.090881 71.072182 -75.694321 84.815941 -75.694511 62.019283 154.194214 0.000000 0.000000 0.000000 135.430756 diff --git a/pyedr/pyedr/tests/data/4_d.edr b/pyedr/pyedr/tests/data/4_d.edr new file mode 100644 index 0000000..4d5e949 Binary files /dev/null and b/pyedr/pyedr/tests/data/4_d.edr differ diff --git a/pyedr/pyedr/tests/data/4_d.xvg b/pyedr/pyedr/tests/data/4_d.xvg new file mode 100644 index 0000000..03f2aab --- /dev/null +++ b/pyedr/pyedr/tests/data/4_d.xvg @@ -0,0 +1,72 @@ +# This file was created Thu Jun 30 15:23:57 2022 +# by the following command: +# g_energy_d -f 4_d.edr -o 4_d.xvg +# +# g_energy_d is part of G R O M A C S: +# +# Gyas ROwers Mature At Cryogenic Speed +# +@ title "Gromacs Energies" +@ xaxis label "Time (ps)" +@ yaxis label "(kJ/mol), (K), (bar), (bar nm), (D)" +@TYPE xy +@ view 0.15, 0.15, 0.75, 0.85 +@ legend on +@ legend box on +@ legend loctype view +@ legend 0.78, 0.8 +@ legend length 2 +@ s0 legend "Bond" +@ s1 legend "Angle" +@ s2 legend "Improper Dih." +@ s3 legend "LJ (SR)" +@ s4 legend "Coulomb (SR)" +@ s5 legend "Potential" +@ s6 legend "Kinetic En." +@ s7 legend "Total Energy" +@ s8 legend "Temperature" +@ s9 legend "Pressure" +@ s10 legend "Vir-XX" +@ s11 legend "Vir-XY" +@ s12 legend "Vir-XZ" +@ s13 legend "Vir-YX" +@ s14 legend "Vir-YY" +@ s15 legend "Vir-YZ" +@ s16 legend "Vir-ZX" +@ s17 legend "Vir-ZY" +@ s18 legend "Vir-ZZ" +@ s19 legend "Pres-XX" +@ s20 legend "Pres-XY" +@ s21 legend "Pres-XZ" +@ s22 legend "Pres-YX" +@ s23 legend "Pres-YY" +@ s24 legend "Pres-YZ" +@ s25 legend "Pres-ZX" +@ s26 legend "Pres-ZY" +@ s27 legend "Pres-ZZ" +@ s28 legend "#Surf*SurfTen" +@ s29 legend "Mu-X" +@ s30 legend "Mu-Y" +@ s31 legend "Mu-Z" +@ s32 legend "T-System" + 0.000000 0.247461 6.340121 5.023643 0.000000 0.000000 11.611225 23.976967 35.588192 274.642808 19.497690 1.011761 9.334921 -7.721660 9.334921 6.738469 5.942023 -7.721660 5.942023 -2.693344 33.679072 -29.047133 26.974417 -29.047133 -7.063831 -17.232533 26.974417 -17.232533 31.877829 40.573678 0.000000 0.000000 0.000000 274.642808 + 0.000200 0.327335 6.765546 5.246335 0.000000 0.000000 12.339216 23.249712 35.588928 266.312502 7.363049 12.196398 11.298821 -6.420675 11.298821 6.446207 6.491961 -6.420675 6.491961 -2.537816 -1.719337 -35.556213 23.377157 -35.556213 -7.373249 -19.023363 23.377157 -19.023363 31.181732 78.061449 0.000000 0.000000 0.000000 266.312502 + 0.000400 0.642561 7.180591 5.463817 0.000000 0.000000 13.286968 22.304386 35.591355 255.484323 -4.902381 23.391609 13.213221 -5.047508 13.213221 5.962883 7.018881 -5.047508 7.018881 -2.292955 -37.702857 -41.884055 19.336823 -41.884055 -7.018587 -20.629067 19.336823 -20.629067 30.014301 114.433141 0.000000 0.000000 0.000000 255.484323 + 0.000600 1.180058 7.580718 5.674731 0.000000 0.000000 14.435507 21.159866 35.595373 242.374478 -17.035301 34.384013 15.090483 -3.663155 15.090483 5.295771 7.536400 -3.663155 7.536400 -1.989280 -73.565343 -48.060268 15.050237 -48.060268 -6.018854 -22.094610 15.050237 -22.094610 28.478296 149.162621 0.000000 0.000000 0.000000 242.374478 + 0.000800 1.913669 7.961694 5.877770 0.000000 0.000000 15.753133 19.847647 35.600781 227.343747 -28.754475 44.955933 16.943579 -2.331433 16.943579 4.454802 8.059319 -2.331433 8.059319 -1.660448 -108.559169 -54.121816 10.734967 -54.121816 -4.398439 -23.473842 10.734967 -23.473842 26.694182 181.722996 0.000000 0.000000 0.000000 227.343747 + 0.001000 2.805711 8.319640 6.071682 0.000000 0.000000 17.197033 18.410252 35.607285 210.879180 -39.767535 54.889932 18.785734 -1.117497 18.785734 3.452168 8.603245 -1.117497 8.603245 -1.342404 -141.913214 -60.111479 6.623471 -60.111479 -2.186103 -24.827830 6.623471 -24.827830 24.796712 211.597700 0.000000 0.000000 0.000000 210.879180 + 0.001200 3.809268 8.651058 6.255286 0.000000 0.000000 18.715613 16.898907 35.614519 193.567563 -49.779080 63.973719 20.629977 -0.086176 20.629977 2.301962 9.184138 -0.086176 9.184138 -1.072373 -172.853490 -66.075675 2.955999 -66.075675 0.585600 -26.222631 2.955999 -26.222631 22.930651 238.293058 0.000000 0.000000 0.000000 193.567563 + 0.001400 4.871063 8.952868 6.427482 0.000000 0.000000 20.251412 15.370659 35.622071 176.062333 -58.499735 72.005253 22.488633 0.699811 22.488633 1.019865 9.817774 0.699811 9.817774 -0.887748 -200.625578 -72.061796 -0.027450 -72.061796 3.880540 -27.726617 -0.027450 -27.726617 21.245833 261.351746 0.000000 0.000000 0.000000 176.062333 + 0.001600 5.934733 9.222418 6.587257 0.000000 0.000000 21.744408 13.885091 35.629500 159.045990 -65.655738 78.797870 24.372779 1.181701 24.372779 -0.377140 10.519177 1.181701 10.519177 -0.824916 -224.517906 -78.115230 -2.095748 -78.115230 7.658949 -29.407499 -2.095748 -29.407499 19.891743 280.366473 0.000000 0.000000 0.000000 159.045990 + 0.001800 6.944309 9.457507 6.733698 0.000000 0.000000 23.135514 12.500859 35.636373 143.190382 -70.998580 84.185236 26.291696 1.306519 26.291696 -1.871030 11.302038 1.306519 11.302038 -0.918060 -243.884822 -84.276269 -3.035416 -84.276269 11.877182 -31.329219 -3.035416 -31.329219 19.011899 294.993146 0.000000 0.000000 0.000000 143.190382 + 0.002000 7.847650 9.656387 6.865998 0.000000 0.000000 24.370035 11.272254 35.642289 129.117392 -74.314216 88.025929 28.252351 1.028798 28.252351 -3.442987 12.178139 1.028798 12.178139 -1.197990 -258.168362 -90.577117 -2.659120 -90.577117 16.487438 -33.548897 -2.659120 -33.548897 18.738276 304.962795 0.000000 0.000000 0.000000 129.117392 + 0.002200 8.599650 9.817769 6.983460 0.000000 0.000000 25.400879 10.246023 35.646902 117.362488 -75.431350 90.207466 30.258945 0.312144 30.258945 -5.073651 13.156835 0.312144 13.156835 -1.691054 -266.917669 -97.039212 -0.813433 -97.039212 21.437552 -36.113995 -0.813433 -36.113995 19.186065 310.091552 0.000000 0.000000 0.000000 117.362488 + 0.002400 9.164976 9.940825 7.085504 0.000000 0.000000 26.191305 9.458642 35.649947 108.343481 -74.228364 90.649595 32.312551 -0.869457 32.312551 -6.743388 14.244605 -0.869457 14.244605 -2.418176 -269.805093 -103.671035 2.614525 -103.671035 26.670986 -39.059877 2.614525 -39.059877 20.449015 310.288071 0.000000 0.000000 0.000000 108.343481 + 0.002600 9.520190 10.025179 7.171673 0.000000 0.000000 26.717041 8.934214 35.651255 102.336442 -70.638498 89.306720 34.410875 -2.530636 34.410875 -8.432576 15.444697 -2.530636 15.444697 -3.394060 -266.638178 -110.466582 7.691949 -110.466582 32.127104 -42.407897 7.691949 -42.407897 22.595581 305.557913 0.000000 0.000000 0.000000 102.336442 + 0.002800 9.655107 10.070905 7.241629 0.000000 0.000000 26.967641 8.683123 35.650763 99.460334 -64.653003 86.169342 36.548149 -4.673992 36.548149 -10.121933 16.756897 -4.673992 16.756897 -4.626594 -257.366916 -117.404605 14.436976 -117.404605 37.741824 -46.164139 14.436976 -46.164139 25.666082 296.004548 0.000000 0.000000 0.000000 99.460334 + 0.003000 9.573303 10.078517 7.295159 0.000000 0.000000 26.946979 8.701541 35.648520 99.671305 -56.322086 81.264466 38.715172 -7.289832 38.715172 -11.792868 18.177421 -7.289832 18.177421 -6.116483 -242.085904 -124.448683 22.817269 -124.448683 43.448656 -50.318858 22.817269 -50.318858 29.670990 281.826830 0.000000 0.000000 0.000000 99.671305 + 0.003200 9.291753 10.048953 7.332172 0.000000 0.000000 26.672878 8.971803 35.644681 102.767002 -45.753570 74.654935 40.899502 -10.356306 40.899502 -13.427867 19.698943 -10.356306 19.698943 -7.857121 -221.031286 -131.548155 32.750644 -131.548155 49.180149 -54.846665 32.750644 -54.846665 34.590427 263.312989 0.000000 0.000000 0.000000 102.767002 + 0.003400 8.839606 9.983562 7.352698 0.000000 0.000000 26.175866 9.463632 35.639498 108.400635 -33.109349 66.437738 43.085779 -13.839945 43.085779 -15.010896 21.310756 -13.839945 21.310756 -9.834707 -194.572630 -138.639838 44.107696 -138.639838 54.869696 -59.707441 44.107696 -59.707441 40.374886 240.831358 0.000000 0.000000 0.000000 108.400635 + 0.003600 8.256199 9.884087 7.356879 0.000000 0.000000 25.497166 10.136141 35.633307 116.103850 -18.599809 56.741351 45.256178 -17.696565 45.256178 -16.527814 22.999053 -17.696565 22.999053 -12.028596 -163.200158 -145.650466 56.716305 -145.650466 60.453615 -64.847897 56.716305 -64.847897 46.947116 214.818249 0.000000 0.000000 0.000000 116.103850 + 0.003800 7.588418 9.752642 7.344972 0.000000 0.000000 24.686032 10.940469 35.626500 125.316974 -2.476496 45.722232 47.390959 -21.872499 47.390959 -17.966767 24.747314 -21.872499 24.747314 -14.411865 -127.507954 -152.499680 70.367767 -152.499680 65.873418 -70.203703 70.367767 -70.203703 54.205046 185.763554 0.000000 0.000000 0.000000 125.316974 + 0.004000 6.887594 9.591687 7.317333 0.000000 0.000000 23.796614 11.822893 35.619507 135.424660 14.976571 33.560620 49.469077 -26.306107 49.469077 -19.318554 26.536777 -26.306107 26.536777 -16.952070 -88.173993 -159.103402 84.824229 -159.103402 71.078102 -75.702045 84.824229 -75.702045 62.025605 154.194741 0.000000 0.000000 0.000000 135.424660 diff --git a/pyedr/pyedr/tests/data/mocks/edr_mock.py b/pyedr/pyedr/tests/data/mocks/edr_mock.py new file mode 100644 index 0000000..e9208be --- /dev/null +++ b/pyedr/pyedr/tests/data/mocks/edr_mock.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +# Helper script to generate mock EDR files with manipulated values. This allows +# setting some values in EDR files in such a way that certain conditions can be +# triggered while parsing. Note that not all parameter combinations are +# sensible and produce valid EDR files. + +import xdrlib +from dataclasses import dataclass + +MAGIC = -55555 # File magic number +ENX_VERSION = 4 # File version +assert ENX_VERSION >= 1 +NSUM = 0 # Value of fr.nsum +# Column names with associated units (units are ignored for version 1) +# These values are parsed in do_enxnms and stored as fr.nms +NMS = [("DUMMY1", "UNIT1"), ("DUMMY2", "UNIT2")] +NRE = len(NMS) # Derive number of columns from NMS +FIRST_REAL = -1.0 # Value of first_real_to_check in do_eheader +FRAME_MAGIC = -7777777 # Frame magic number +NSTEPS = 3 # Number of steps to write +# Time step between frames +# Frame times are simply set to step*DT +DT = 0.5 +NDISRE = 0 # Number of distance restraints (can be > 0 for versions < 4) +E_SIZE = 0 # Value to write as fr.e_size + + +@dataclass +class Block: + bid: int # block id + sub: [] # list of sub blocks + + +@dataclass +class SubBlock: + nr: int # number of values stored in sub block + btype: int # type of stored values + + +# Option 1: Write no other data blocks + +BLOCKS = [] + +# Option 2: Write blocks of every possible sub-block type + +# BLOCKS = [] +# for t in range(6): +# bid = t + 3 # generate some arbitrary block id +# sub_nr1 = 7 - t # and nr of values in the sub block +# sub_nr2 = 6 - t +# BLOCKS.append(Block(bid, [SubBlock(sub_nr1, t), SubBlock(sub_nr2, t)])) + +# Option 3: Write a block with an invalid sub-block type (> 5) + +# BLOCKS = [Block(7, [SubBlock(2, 0), SubBlock(1, 1_000_000_000)])] + +# Option 4: Write some additional distance restraints +# and optionally some more blocks +# Version must be set to < 4 +# Note from pyedr: blocks in old version files always have 1 subblock +# that consists of reals + +# NDISRE = 2 +# BLOCKS = [] +# for i in range(3): +# BLOCKS.append(Block(i, [SubBlock(4, 1)])) +# ENX_VERSION = 3 + +NBLOCK = len(BLOCKS) + +p = xdrlib.Packer() + +# do_enxnms +if ENX_VERSION == 1: + p.pack_int(NRE) +else: + p.pack_int(MAGIC) + p.pack_int(ENX_VERSION) + p.pack_int(NRE) +for nm, u in NMS: + p.pack_string(nm.encode("ascii")) + if ENX_VERSION >= 2: + p.pack_string(u.encode("ascii")) + +for step in range(NSTEPS): + t = step * DT # Just set some value for fr.t + # do_enx + # -> do_eheader + if ENX_VERSION == 1: + p.pack_float(t) + p.pack_int(step) + else: + p.pack_float(FIRST_REAL) + p.pack_int(FRAME_MAGIC) + p.pack_int(ENX_VERSION) + p.pack_double(t) + p.pack_hyper(step) + p.pack_int(NSUM) + if ENX_VERSION >= 3: + p.pack_hyper(NSTEPS) + if ENX_VERSION >= 5: + p.pack_double(DT) + p.pack_int(NRE) + p.pack_int(NDISRE) + p.pack_int(NBLOCK) + if NDISRE != 0: + assert ENX_VERSION < 4 + + frame_blocks = BLOCKS.copy() + startb = 0 + if NDISRE > 0: + enxDISRE = 3 # Some constant defined by Gromacs + # Sub-block type is 1 = float + frame_blocks.insert( + 0, Block(enxDISRE, [SubBlock(NDISRE, 1), SubBlock(NDISRE, 1)]) + ) + startb += 1 + for b in range(startb, len(frame_blocks)): + if ENX_VERSION < 4: + # Old versions have only one sub block of reals (here 1 = float) + assert len(frame_blocks[b].sub) == 1 + assert frame_blocks[b].sub[0].btype == 1 + p.pack_int(frame_blocks[b].sub[0].nr) + else: + p.pack_int(frame_blocks[b].bid) + p.pack_int(len(frame_blocks[b].sub)) + for sub in frame_blocks[b].sub: + p.pack_int(sub.btype) + p.pack_int(sub.nr) + + p.pack_int(E_SIZE) + p.pack_int(0) # dummy + p.pack_int(0) # dummy + # <- do_eheader + for i in range(NRE): + # Just generate some arbitrary value for the energy + # Depends on step and column number + p.pack_float(step * 100 + i) # e + if ENX_VERSION == 1 or NSUM > 0: + p.pack_float(0.0) # eav + p.pack_float(0.0) # esum + if ENX_VERSION == 1: + p.pack_float(0.0) # dummy + + for b in range(len(frame_blocks)): + for sub in frame_blocks[b].sub: + for n in range(sub.nr): + if sub.btype == 0: + p.pack_int(0) + elif sub.btype == 1: + p.pack_float(0.0) + elif sub.btype == 2: + p.pack_double(0.0) + elif sub.btype == 3: + p.pack_hyper(0) + elif sub.btype == 4: + # GMX casts the char to an u8 and writes this as an u32 + p.pack_int(0) + elif sub.btype == 5: + p.pack_string("ABC".encode("ascii")) + else: + print("WARNING: Unknown sub-block type") + p.pack_int(0) + + +with open("dump.edr", "wb") as f: + f.write(p.get_buffer()) diff --git a/pyedr/pyedr/tests/data/mocks/v1_nre2_esum0.edr b/pyedr/pyedr/tests/data/mocks/v1_nre2_esum0.edr new file mode 100644 index 0000000..9b1a088 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v1_nre2_esum0.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v1_step_negative.edr b/pyedr/pyedr/tests/data/mocks/v1_step_negative.edr new file mode 100644 index 0000000..f31c997 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v1_step_negative.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v3_ndisre2_blocks.edr b/pyedr/pyedr/tests/data/mocks/v3_ndisre2_blocks.edr new file mode 100644 index 0000000..c64413b Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v3_ndisre2_blocks.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_all_block_types.edr b/pyedr/pyedr/tests/data/mocks/v4_all_block_types.edr new file mode 100644 index 0000000..7059568 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_all_block_types.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_first_real_v1.edr b/pyedr/pyedr/tests/data/mocks/v4_first_real_v1.edr new file mode 100644 index 0000000..1b5ba1c Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_first_real_v1.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_invalid_block_type.edr b/pyedr/pyedr/tests/data/mocks/v4_invalid_block_type.edr new file mode 100644 index 0000000..68ad7cf Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_invalid_block_type.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_invalid_file_magic.edr b/pyedr/pyedr/tests/data/mocks/v4_invalid_file_magic.edr new file mode 100644 index 0000000..26cfe8f Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_invalid_file_magic.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_invalid_frame_magic.edr b/pyedr/pyedr/tests/data/mocks/v4_invalid_frame_magic.edr new file mode 100644 index 0000000..041e42c Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_invalid_frame_magic.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v4_large_version_frame.edr b/pyedr/pyedr/tests/data/mocks/v4_large_version_frame.edr new file mode 100644 index 0000000..2b24c29 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v4_large_version_frame.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v5_step_negative.edr b/pyedr/pyedr/tests/data/mocks/v5_step_negative.edr new file mode 100644 index 0000000..24e9cd2 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v5_step_negative.edr differ diff --git a/pyedr/pyedr/tests/data/mocks/v_large.edr b/pyedr/pyedr/tests/data/mocks/v_large.edr new file mode 100644 index 0000000..0ed8434 Binary files /dev/null and b/pyedr/pyedr/tests/data/mocks/v_large.edr differ diff --git a/pyedr/pyedr/tests/datafiles.py b/pyedr/pyedr/tests/datafiles.py index f511891..439009c 100644 --- a/pyedr/pyedr/tests/datafiles.py +++ b/pyedr/pyedr/tests/datafiles.py @@ -1,4 +1,4 @@ -#-*- coding:utf-8 -*- +# -*- coding:utf-8 -*- # PyEDR -- a library to manipulate Gromacs EDR file in python # Copyright (C) 2022 Jonathan Barnoud # @@ -17,16 +17,11 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301 USA -__all__ = [ - "EDR", "EDR_XVG", # all EDR fields read with ``gmx energy`` - "EDR_IRREGULAR", "EDR_IRREGULAR_XVG", - "EDR_DOUBLE", "EDR_DOUBLE_XVG", - "EDR_BLOCKS", "EDR_BLOCKS_XVG", -] - # Move to impportlib.resources when py>=3.7 from pkg_resources import resource_filename +from pathlib import Path + EDR = resource_filename(__name__, 'data/cat_small.edr') EDR_XVG = resource_filename(__name__, 'data/cat_small.xvg') @@ -43,3 +38,102 @@ EDR_BLOCKS = resource_filename(__name__, 'data/blocks.edr') EDR_BLOCKS_XVG = resource_filename(__name__, 'data/blocks.xvg') EDR_BLOCKS_UNITS = resource_filename(__name__, 'data/blocks_units.p') + +# Testfiles for file version 1 with single precision +# See GROMACS regressiontests `Initial revision` (96c57f0d) +# http://redmine.gromacs.org/projects/regressiontests +EDR_V1 = resource_filename(__name__, 'data/1.edr') +EDR_V1_XVG = resource_filename(__name__, 'data/1.xvg') +EDR_V1_UNITS = resource_filename(__name__, 'data/1_units.p') + +# Testfiles for file version 1 with double precision +# See GROMACS regressiontests `Initial revision` (96c57f0d) +# http://redmine.gromacs.org/projects/regressiontests +EDR_V1_DOUBLE = resource_filename(__name__, 'data/1_d.edr') +EDR_V1_DOUBLE_XVG = resource_filename(__name__, 'data/1_d.xvg') +EDR_V1_DOUBLE_UNITS = resource_filename(__name__, 'data/1_d_units.p') + +# Testfiles for file version 2 +# Generated from GROMACS regression test 'simple/imp1' +# at branch 'release-4-5' +# See https://gitlab.com/gromacs/gromacs-regressiontests +# GROMACS version commit bcbfcdee8e449344605552fa90c18eeab2b1fc53 +EDR_V2 = resource_filename(__name__, 'data/2.edr') +EDR_V2_XVG = resource_filename(__name__, 'data/2.xvg') +EDR_V2_UNITS = resource_filename(__name__, 'data/234_units.p') +EDR_V2_DOUBLE = resource_filename(__name__, 'data/2_d.edr') +EDR_V2_DOUBLE_XVG = resource_filename(__name__, 'data/2_d.xvg') +EDR_V2_DOUBLE_UNITS = resource_filename(__name__, 'data/234_units.p') + +# Testfiles for file version 3 +# Generated from GROMACS regression test 'simple/imp1' +# at branch 'release-4-5' +# See https://gitlab.com/gromacs/gromacs-regressiontests +# GROMACS version commit d9c1da8c98ef7a99db5de71c57f683cf19435ef5 +EDR_V3 = resource_filename(__name__, 'data/3.edr') +EDR_V3_XVG = resource_filename(__name__, 'data/3.xvg') +EDR_V3_UNITS = resource_filename(__name__, 'data/234_units.p') +EDR_V3_DOUBLE = resource_filename(__name__, 'data/3_d.edr') +EDR_V3_DOUBLE_XVG = resource_filename(__name__, 'data/3_d.xvg') +EDR_V3_DOUBLE_UNITS = resource_filename(__name__, 'data/234_units.p') + +# Testfiles for file version 4 +# Generated from GROMACS regression test 'simple/imp1' +# at branch 'release-4-5' +# See https://gitlab.com/gromacs/gromacs-regressiontests +# GROMACS version commit 5d24334a33745dbf26f2904badcb3c4989e087d3 +EDR_V4 = resource_filename(__name__, 'data/4.edr') +EDR_V4_XVG = resource_filename(__name__, 'data/4.xvg') +EDR_V4_UNITS = resource_filename(__name__, 'data/234_units.p') +EDR_V4_DOUBLE = resource_filename(__name__, 'data/4_d.edr') +EDR_V4_DOUBLE_XVG = resource_filename(__name__, 'data/4_d.xvg') +EDR_V4_DOUBLE_UNITS = resource_filename(__name__, 'data/234_units.p') + +# Collection of testfiles and corresponding reference data as a tuple. +# A tuple contains paths for the testfile, expected values in a XVG file, +# a serialized unit dictionary, and the EDR version number in this order. +TESTFILE_PARAMS = [ + (EDR, EDR_XVG, EDR_UNITS, 5), + (EDR_IRREG, EDR_IRREG_XVG, EDR_IRREG_UNITS, 5), + (EDR_DOUBLE, EDR_DOUBLE_XVG, EDR_DOUBLE_UNITS, 5), + (EDR_BLOCKS, EDR_BLOCKS_XVG, EDR_BLOCKS_UNITS, 5), + (EDR_V1, EDR_V1_XVG, EDR_V1_UNITS, 1), + (EDR_V1_DOUBLE, EDR_V1_DOUBLE_XVG, EDR_V1_DOUBLE_UNITS, 1), + (EDR_V2, EDR_V2_XVG, EDR_V2_UNITS, 2), + (EDR_V2_DOUBLE, EDR_V2_DOUBLE_XVG, EDR_V2_DOUBLE_UNITS, 2), + (EDR_V3, EDR_V3_XVG, EDR_V3_UNITS, 3), + (EDR_V3_DOUBLE, EDR_V3_DOUBLE_XVG, EDR_V3_DOUBLE_UNITS, 3), + (EDR_V4, EDR_V4_XVG, EDR_V4_UNITS, 4), + (EDR_V4_DOUBLE, EDR_V4_DOUBLE_XVG, EDR_V4_DOUBLE_UNITS, 4), + (Path(EDR), EDR_XVG, EDR_UNITS, 5), + ] + +EDR_MOCK_V1_ESUM0 = resource_filename(__name__, 'data/mocks/v1_nre2_esum0.edr') +EDR_MOCK_V5_STEP_NEGATIVE = resource_filename( + __name__, 'data/mocks/v5_step_negative.edr' +) +EDR_MOCK_V1_STEP_NEGATIVE = resource_filename( + __name__, 'data/mocks/v1_step_negative.edr' +) +EDR_MOCK_V_LARGE = resource_filename(__name__, 'data/mocks/v_large.edr') +EDR_MOCK_V4_LARGE_VERSION_FRAME = resource_filename( + __name__, 'data/mocks/v4_large_version_frame.edr' +) +EDR_MOCK_V4_FIRST_REAL_V1 = resource_filename( + __name__, 'data/mocks/v4_first_real_v1.edr' +) +EDR_MOCK_V4_INVALID_FILE_MAGIC = resource_filename( + __name__, 'data/mocks/v4_invalid_file_magic.edr' +) +EDR_MOCK_V4_INVALID_FRAME_MAGIC = resource_filename( + __name__, 'data/mocks/v4_invalid_frame_magic.edr' +) +EDR_MOCK_V4_INVALID_BLOCK_TYPE = resource_filename( + __name__, 'data/mocks/v4_invalid_block_type.edr' +) +EDR_MOCK_V4_ALL_BLOCK_TYPES = resource_filename( + __name__, 'data/mocks/v4_all_block_types.edr' +) +EDR_MOCK_V3_NDISRE2_BLOCKS = resource_filename( + __name__, 'data/mocks/v3_ndisre2_blocks.edr' +) diff --git a/pyedr/pyedr/tests/test_edr.py b/pyedr/pyedr/tests/test_edr.py index 51c9754..4cb54b1 100644 --- a/pyedr/pyedr/tests/test_edr.py +++ b/pyedr/pyedr/tests/test_edr.py @@ -1,12 +1,10 @@ -#-*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Tests for pyedr """ from collections import namedtuple import contextlib -from io import StringIO -from pathlib import Path import re import sys import pickle @@ -16,11 +14,7 @@ from numpy.testing import assert_allclose import pyedr -from pyedr.tests.datafiles import ( - EDR, EDR_XVG, EDR_UNITS, EDR_IRREG, EDR_IRREG_XVG, - EDR_IRREG_UNITS, EDR_DOUBLE, EDR_DOUBLE_XVG, EDR_DOUBLE_UNITS, - EDR_BLOCKS, EDR_BLOCKS_XVG, EDR_BLOCKS_UNITS -) +from pyedr.tests.datafiles import EDR, EDR_XVG, TESTFILE_PARAMS # Constants for XVG parsing @@ -35,16 +29,25 @@ 'edrfile', 'xvgfile']) +def check_version_warning(func, edrfile, version): + if version == pyedr.ENX_VERSION: + return func(edrfile) + else: + with pytest.warns( + UserWarning, + match=f'enx file_version {version}, ' + f'implementation version {pyedr.ENX_VERSION}' + ): + return func(edrfile) + + @pytest.fixture(scope='module', - params=[(EDR, EDR_XVG, EDR_UNITS), - (EDR_IRREG, EDR_IRREG_XVG, EDR_IRREG_UNITS), - (EDR_DOUBLE, EDR_DOUBLE_XVG, EDR_DOUBLE_UNITS), - (EDR_BLOCKS, EDR_BLOCKS_XVG, EDR_BLOCKS_UNITS), - (Path(EDR), EDR_XVG, EDR_UNITS), ]) + params=TESTFILE_PARAMS) def edr(request): - edrfile, xvgfile, unitfile = request.param - edr_dict = pyedr.edr_to_dict(edrfile) - edr_units = pyedr.get_unit_dictionary(edrfile) + edrfile, xvgfile, unitfile, version = request.param + edr_dict = check_version_warning(pyedr.edr_to_dict, edrfile, version) + edr_units = check_version_warning(pyedr.get_unit_dictionary, + edrfile, version) xvgdata, xvgnames, xvgprec = read_xvg(xvgfile) with open(unitfile, "rb") as f: true_units = pickle.load(f) @@ -79,6 +82,7 @@ def test_columns(self, edr): for ref, val in zip(edr.xvgcols, edr.edr_dict.keys()): assert ref == val, "mismatching column entries" + def test_times(self, edr): """ Test that the time is read correctly when dt is regular. @@ -94,7 +98,7 @@ def test_content(self, edr): # already tested under `test_times` if key != "Time": assert_allclose(edr.xvgdata[:, i-1], edr.edr_dict[key], - atol=edr.xvgprec/2) + atol=edr.xvgprec) def test_verbosity(self): """ @@ -106,7 +110,7 @@ def test_verbosity(self): for i, key in enumerate(edr_dict.keys()): assert_allclose(ref_content[:, i], edr_dict[key], - atol=prec/2) + atol=prec) def read_xvg(path): @@ -164,7 +168,7 @@ def redirect_stderr(target): """ Redirect sys.stderr to an other object. - This function is aimed to be used as a contaxt manager. It is useful + This function is aimed to be used as a context manager. It is useful especially to redirect stderr to stdout as stdout get captured by nose while stderr is not. stderr can also get redirected to any other object that may act on it, such as a StringIO to inspect its content. diff --git a/pyedr/pyedr/tests/test_mocks.py b/pyedr/pyedr/tests/test_mocks.py new file mode 100644 index 0000000..e155d4f --- /dev/null +++ b/pyedr/pyedr/tests/test_mocks.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- + +""" +Tests for pyedr +""" +import pytest +from numpy.testing import assert_allclose + +import pyedr +from pyedr.tests.datafiles import ( + EDR_MOCK_V1_ESUM0, + EDR_MOCK_V5_STEP_NEGATIVE, + EDR_MOCK_V1_STEP_NEGATIVE, + EDR_MOCK_V_LARGE, + EDR_MOCK_V4_LARGE_VERSION_FRAME, + EDR_MOCK_V4_FIRST_REAL_V1, + EDR_MOCK_V4_INVALID_FILE_MAGIC, + EDR_MOCK_V4_INVALID_FRAME_MAGIC, + EDR_MOCK_V4_INVALID_BLOCK_TYPE, + EDR_MOCK_V4_ALL_BLOCK_TYPES, + EDR_MOCK_V3_NDISRE2_BLOCKS, +) + + +def assert_dict(d): + assert len(d) == 3 + assert_allclose(d["Time"], [0.0, 0.5, 1.0]) + assert_allclose(d["DUMMY1"], [0.0, 100.0, 200.0]) + assert_allclose(d["DUMMY2"], [1.0, 101.0, 201.0]) + + +def test_esum_zero_v1(): + with pytest.warns( + UserWarning, + match=f"enx file_version 1, " + f"implementation version {pyedr.ENX_VERSION}", + ): + d = pyedr.edr_to_dict(EDR_MOCK_V1_ESUM0) + assert_dict(d) + + +def test_step_negative_v5(): + with pytest.raises(ValueError, match="Something went wrong"): + pyedr.edr_to_dict(EDR_MOCK_V5_STEP_NEGATIVE) + + +def test_step_negative_v1(): + with pytest.warns( + UserWarning, + match=f"enx file_version 1, " + f"implementation version {pyedr.ENX_VERSION}", + ): + with pytest.raises(RuntimeError, match="Failed reading header") as e: + pyedr.edr_to_dict(EDR_MOCK_V1_STEP_NEGATIVE) + assert ( + isinstance(e.value.__cause__, ValueError) + and str(e.value.__cause__) + == "edr file with negative step number or " + "unreasonable time (and without version number)." + ) + + +def test_large_invalid_version(): + with pytest.raises( + ValueError, + match="Reading file version 1000000000 with " + f"version {pyedr.ENX_VERSION} implementation", + ): + pyedr.edr_to_dict(EDR_MOCK_V_LARGE) + + +def test_large_invalid_version_frame_v4(): + with pytest.warns( + UserWarning, + match=f"enx file_version 4, " + f"implementation version {pyedr.ENX_VERSION}", + ): + with pytest.raises(RuntimeError, match="Failed reading header") as e: + pyedr.edr_to_dict(EDR_MOCK_V4_LARGE_VERSION_FRAME) + assert ( + isinstance(e.value.__cause__, ValueError) + and str(e.value.__cause__) + == "Reading file version 1000000000 with " + f"version {pyedr.ENX_VERSION} implementation" + ) + + +def test_step_negative_v4(): + with pytest.warns( + UserWarning, + match=f"enx file_version 4, " + f"implementation version {pyedr.ENX_VERSION}", + ): + with pytest.raises(RuntimeError, match="Failed reading header") as e: + pyedr.edr_to_dict(EDR_MOCK_V4_FIRST_REAL_V1) + assert ( + isinstance(e.value.__cause__, ValueError) + and str(e.value.__cause__) + == "Expected file version 1, found version 4" + ) + + +def test_invalid_file_magic_v4(): + with pytest.raises( + ValueError, + match="Energy names magic number mismatch, " + "this is not a GROMACS edr file", + ): + pyedr.edr_to_dict(EDR_MOCK_V4_INVALID_FILE_MAGIC) + + +def test_invalid_frame_magic_v4(): + with pytest.warns( + UserWarning, + match=f"enx file_version 4, " + f"implementation version {pyedr.ENX_VERSION}", + ): + with pytest.raises(RuntimeError, match="Failed reading header") as e: + pyedr.edr_to_dict(EDR_MOCK_V4_INVALID_FRAME_MAGIC) + assert ( + isinstance(e.value.__cause__, ValueError) + and str(e.value.__cause__) + == "Energy header magic number mismatch, " + "this is not a GROMACS edr file" + ) + + +def test_block_type_v4(): + with pytest.warns( + UserWarning, + match=f"enx file_version 4, " + f"implementation version {pyedr.ENX_VERSION}", + ): + with pytest.raises( + ValueError, + match="Reading unknown block data type: " + "this file is corrupted or from the future", + ): + pyedr.edr_to_dict(EDR_MOCK_V4_INVALID_BLOCK_TYPE) + + +def test_all_block_types_v4(): + with pytest.warns( + UserWarning, + match=f"enx file_version 4, " + f"implementation version {pyedr.ENX_VERSION}", + ): + d = pyedr.edr_to_dict(EDR_MOCK_V4_ALL_BLOCK_TYPES) + assert_dict(d) + + +def test_ndisre2_blocks_v3(): + with pytest.warns( + UserWarning, + match=f"enx file_version 3, " + f"implementation version {pyedr.ENX_VERSION}", + ): + d = pyedr.edr_to_dict(EDR_MOCK_V3_NDISRE2_BLOCKS) + assert_dict(d) diff --git a/pyedr/setup.py b/pyedr/setup.py index b43ea73..5c4f28d 100755 --- a/pyedr/setup.py +++ b/pyedr/setup.py @@ -3,5 +3,4 @@ setup(name="pyedr", setup_requires=['pbr'], pbr=True, - include_package_data=True, -) + include_package_data=True,)