Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'XTCReader' object has no attribute '_xdr' #73

Closed
H-EKE opened this issue Feb 5, 2025 · 3 comments
Closed

AttributeError: 'XTCReader' object has no attribute '_xdr' #73

H-EKE opened this issue Feb 5, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@H-EKE
Copy link

H-EKE commented Feb 5, 2025

Hi,

Im trying to compare and cluster 2 replicates with PENSa.

The code that I am using is the following one

import os
from pensa.preprocessing import load_selection, \
    extract_coordinates, extract_coordinates_combined, \
    extract_aligned_coordinates, extract_combined_grid


# Define root directory
root_dir = '/scratch_shared/MOR/'

# Simulation A
ref_file_a =  root_dir+'prod5/structure.psf'
pdb_file_a =  root_dir+'prod5/structure.pdb'
trj_file_a = [root_dir+'prod5/output.xtc']

# Simulation B
ref_file_b =  root_dir+'prod4/structure.psf'
pdb_file_b =  root_dir+'prod4/structure.pdb'
trj_file_b = [root_dir+'prod4/output4.xtc']

# Output directories
for subdir in ['traj', 'features', 'plots', 'vispdb', 'pca', 'clusters', 'results']:
    os.makedirs(subdir, exist_ok=True)

# Define selection
resnums = "59:61 96:130 137:172 181:207 229:274 292:329 335:367"
sel_string_a = f"segid R and resnum {resnums}"
sel_string_b = f"segid R and resnum {resnums}"

print(f'Selection A:\n{sel_string_a}\n')
print(f'Selection B:\n{sel_string_b}\n')

# Extract coordinates
out_name_a = "traj/condition-a"
out_name_b = "traj/condition-b"

extract_coordinates(ref_file_a, pdb_file_a, trj_file_a, out_name_a+"_tm", sel_string_a)
extract_coordinates(ref_file_b, pdb_file_b, trj_file_b, out_name_b+"_tm", sel_string_b)

# Load structures
sim_a_tmr = read_structure_features(
    out_name_a+"_tm.gro",
    out_name_a+"_tm.xtc",
    cossin=True
)
sim_b_tmr = read_structure_features(
    out_name_b+"_tm.gro",
    out_name_b+"_tm.xtc",
    cossin=True
)

sim_a_tmr_feat, sim_a_tmr_data = sim_a_tmr
sim_b_tmr_feat, sim_b_tmr_data = sim_b_tmr

# Concatenate torsions
combined_data_tors = np.concatenate((sim_a_tmr_data['bb-torsions'], sim_b_tmr_data['bb-torsions']),
 axis=0)

# Perform PCA
pca_combined = calculate_pca(combined_data_tors)

# Plot eigenvalues
idx, ev = pca_eigenvalues_plot(
    pca_combined, num=12,
    plot_file='plots/combined_tmr_eigenvalues.pdf'
)

# Compare projections
_ = compare_projections(
    sim_a_tmr_data['bb-torsions'],
    sim_b_tmr_data['bb-torsions'],
    pca_combined,
    label_a='A', label_b='B'
)

# Sort trajectories along principal components
_ = sort_trajs_along_common_pc(
    sim_a_tmr_data['bb-torsions'], sim_b_tmr_data['bb-torsions'],
    out_name_a+"_tm.gro", out_name_b+"_tm.gro",
    out_name_a+"_tm.xtc", out_name_b+"_tm.xtc",
    "pca/receptor_by_tmr", num_pc=3, start_frame=0
)

# PCA feature correlation
_ = pca_feature_correlation(
    sim_a_tmr_feat['bb-torsions'], sim_a_tmr_data['bb-torsions'],
    pca=pca_combined, num=3, threshold=0.4
)
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/Bio/Application/__init__.py:39: BiopythonD
eprecationWarning: The Bio.Application modules and modules relying on it have been deprecated.

Due to the on going maintenance burden of keeping command line application
wrappers up to date, we have decided to deprecate and eventually remove these
modules.

We instead now recommend building your command line and invoking it directly
with the subprocess module.
  warnings.warn(
Selection A:
segid R and resnum 59:61 96:130 137:172 181:207 229:274 292:329 335:367

Selection B:
segid R and resnum 59:61 96:130 137:172 181:207 229:274 292:329 335:367

/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:777: UserWar
ning: Unit cell dimensions not found. CRYST1 record set to unitary values.
  warnings.warn("Unit cell dimensions not found. "
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'altLocs' Using default value of ' '
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'icodes' Using default value of ' '
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'chainIDs' Using default value of ''
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'occupancies' Using default value of '1.0'
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'tempfactors' Using default value of '0.0'
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'elements' Using default value of ' '
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'record_types' Using default value of 'ATOM'
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1154: UserWa
rning: Found no information for attr: 'formalcharges' Using default value of '0'
  warnings.warn("Found no information for attr: '{}'"
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/PDB.py:1201: UserWa
rning: Found missing chainIDs. Corresponding atoms will use value of 'X'
  warnings.warn("Found missing chainIDs."
/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/GRO.py:479: UserWar
ning: missing dimension - setting unit cell to zeroed box [0., 0., 0.]
  warnings.warn(wmsg)
Traceback (most recent call last):
  File "/scratch_shared/MOR/clustering1.py", line 37, in <module>
    extract_coordinates(ref_file_b, pdb_file_b, trj_file_b, out_name_b+"_tm", sel_string_b)
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/pensa/preprocessing/coordinates.py
", line 48, in extract_coordinates
    u = mda.Universe(top, trj)
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/core/universe.py", line
 436, in __init__
    self.load_new(coordinates, format=format, in_memory=in_memory,
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/core/universe.py", line
 665, in load_new
    self.trajectory = reader(filename, format=format, **kwargs)
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/lib/util.py", line 2562
, in wrapper
    return func(self, *args, **kwargs)
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/XDR.py", li
ne 148, in __init__
    self._xdr = self._file(self.filename)
  File "MDAnalysis/lib/formats/libmdaxdr.pyx", line 135, in MDAnalysis.lib.formats.libmdaxdr._XDRFi
le.__cinit__
  File "MDAnalysis/lib/formats/libmdaxdr.pyx", line 194, in MDAnalysis.lib.formats.libmdaxdr._XDRFi
le.open
OSError: File does not exist: b'/scratch_shared/MOR/prod4/output4.xtc'
Exception ignored in: <function ReaderBase.__del__ at 0x7f0d78c93e20>
Traceback (most recent call last):
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/base.py", l
ine 1531, in __del__
    self.close()
  File "/home/***/.conda/envs/pensa/lib/python3.10/site-packages/MDAnalysis/coordinates/XDR.py", li
ne 186, in close
    self._xdr.close()
AttributeError: 'XTCReader' object has no attribute '_xdr'

In the past I had this issue too using MDAnalysis AttributeError: 'XTCReader' object has no attribute '_xdr' but I was able to fix it doing this

u = mda.Universe(data.TPR, data.XTC, refresh_offsets=True)

Is there a way to fix this in PENSA? Or I messed up somehting for clustering the MD?

Im using the following environment

conda list -n pensa
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alsa-lib                  1.2.13               hb9d3cd8_0    conda-forge
biopython                 1.85            py310ha75aee5_1    conda-forge
biotite                   1.1.0           py310hf71b8c6_1    conda-forge
biotraj                   1.2.2           py310hf71b8c6_0    conda-forge
blosc                     1.21.6               he440d0b_1    conda-forge
brotli                    1.1.0                hb9d3cd8_2    conda-forge
brotli-bin                1.1.0                hb9d3cd8_2    conda-forge
brotli-python             1.1.0           py310hf71b8c6_2    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
c-ares                    1.34.4               hb9d3cd8_0    conda-forge
ca-certificates           2025.1.31            hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.18.2               h3394656_1    conda-forge
certifi                   2024.12.14         pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py310h8deb56e_0    conda-forge
cftime                    1.6.4           py310hf462985_1    conda-forge
charset-normalizer        3.4.1              pyhd8ed1ab_0    conda-forge
click                     8.1.8                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_1    conda-forge
contourpy                 1.3.1           py310h3788b33_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_1    conda-forge
cyrus-sasl                2.1.27               h54b06d7_7    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
deeptime                  0.4.4           py310h5eaa309_3    conda-forge
double-conversion         3.3.0                h59595ed_0    conda-forge
expat                     2.6.4                h5888daf_0    conda-forge
fasteners                 0.19               pyhd8ed1ab_1    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_3    conda-forge
fontconfig                2.15.0               h7e30c49_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.55.8          py310h89163eb_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
gpcrmining                0.2.0                    pypi_0    pypi
graphite2                 1.3.13            h59595ed_1003    conda-forge
griddataformats           1.0.2              pyhd8ed1ab_1    conda-forge
gsd                       3.4.2           py310ha75aee5_0    conda-forge
h2                        4.2.0              pyhd8ed1ab_0    conda-forge
h5py                      3.12.1          nompi_py310hacc6608_103    conda-forge
harfbuzz                  10.2.0               h4bba637_0    conda-forge
hatch-cython              0.5.1                    pypi_0    pypi
hdf4                      4.2.15               h2a13503_7    conda-forge
hdf5                      1.14.4          nompi_h2d575fe_105    conda-forge
hpack                     4.1.0              pyhd8ed1ab_0    conda-forge
hyperframe                6.1.0              pyhd8ed1ab_0    conda-forge
icu                       75.1                 he02047a_0    conda-forge
idna                      3.10               pyhd8ed1ab_1    conda-forge
joblib                    1.4.2              pyhd8ed1ab_1    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.7           py310h3788b33_0    conda-forge
krb5                      1.21.3               h659f571_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.43                 h712a8e2_2    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.3                h59595ed_0    conda-forge
libblas                   3.9.0           28_h59b9bed_openblas    conda-forge
libbrotlicommon           1.1.0                hb9d3cd8_2    conda-forge
libbrotlidec              1.1.0                hb9d3cd8_2    conda-forge
libbrotlienc              1.1.0                hb9d3cd8_2    conda-forge
libcblas                  3.9.0           28_he106b2a_openblas    conda-forge
libclang-cpp19.1          19.1.7          default_hb5137d0_1    conda-forge
libclang13                19.1.7          default_h9c6a7e4_1    conda-forge
libcups                   2.3.3                h4637d8d_4    conda-forge
libcurl                   8.11.1               h332b0f4_0    conda-forge
libdeflate                1.23                 h4ddbbb0_0    conda-forge
libdrm                    2.4.124              hb9d3cd8_0    conda-forge
libedit                   3.1.20250104    pl5321h7949ede_0    conda-forge
libegl                    1.7.0                ha4b6fd6_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.6.4                h5888daf_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.2.0               h77fa898_1    conda-forge
libgcc-ng                 14.2.0               h69a702a_1    conda-forge
libgfortran               14.2.0               h69a702a_1    conda-forge
libgfortran5              14.2.0               hd5240d6_1    conda-forge
libgl                     1.7.0                ha4b6fd6_2    conda-forge
libglib                   2.82.2               h2ff4ddf_1    conda-forge
libglvnd                  1.7.0                ha4b6fd6_2    conda-forge
libglx                    1.7.0                ha4b6fd6_2    conda-forge
libgomp                   14.2.0               h77fa898_1    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           28_h7ac8fdf_openblas    conda-forge
libllvm19                 19.1.7               ha7bfdaf_1    conda-forge
liblzma                   5.6.4                hb9d3cd8_0    conda-forge
liblzma-devel             5.6.4                hb9d3cd8_0    conda-forge
libnetcdf                 4.9.2           nompi_h5ddbaa4_116    conda-forge
libnghttp2                1.64.0               h161d5f1_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libntlm                   1.8                  hb9d3cd8_0    conda-forge
libopenblas               0.3.28          pthreads_h94d23a6_1    conda-forge
libopengl                 1.7.0                ha4b6fd6_2    conda-forge
libpciaccess              0.18                 hd590300_0    conda-forge
libpng                    1.6.46               h943b412_0    conda-forge
libpq                     17.2                 h3b95a9b_1    conda-forge
libsqlite                 3.48.0               hee588c1_1    conda-forge
libssh2                   1.11.1               hf672d98_0    conda-forge
libstdcxx                 14.2.0               hc0a3c3a_1    conda-forge
libstdcxx-ng              14.2.0               h4852527_1    conda-forge
libtiff                   4.7.0                hd9ff511_3    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libwebp-base              1.5.0                h851e524_0    conda-forge
libxcb                    1.17.0               h8a09558_0    conda-forge
libxkbcommon              1.8.0                hc4a0caf_0    conda-forge
libxml2                   2.13.5               h8d12d68_1    conda-forge
libxslt                   1.1.39               h76b75d6_0    conda-forge
libzip                    1.11.2               h6991a6a_0    conda-forge
libzlib                   1.3.1                hb9d3cd8_2    conda-forge
lz4-c                     1.10.0               h5888daf_1    conda-forge
matplotlib                3.10.0          py310hff52083_0    conda-forge
matplotlib-base           3.10.0          py310h68603db_0    conda-forge
mda-xdrlib                0.2.0              pyhd8ed1ab_1    conda-forge
mdahole2-base             0.5.0              pyhd8ed1ab_1    conda-forge
mdanalysis                2.8.0           py310h5eaa309_0    conda-forge
mmtf-python               1.1.3              pyhd8ed1ab_0    conda-forge
mrcfile                   1.5.4              pyhd8ed1ab_0    conda-forge
msgpack-python            1.1.0           py310h3788b33_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              9.0.1                h266115a_4    conda-forge
mysql-libs                9.0.1                he0572af_4    conda-forge
ncurses                   6.5                  h2d0b736_3    conda-forge
netcdf4                   1.7.2           nompi_py310h5146f0f_101    conda-forge
networkx                  3.4.2              pyh267e887_2    conda-forge
numpy                     2.2.2           py310hefbff90_0    conda-forge
openjpeg                  2.5.3                h5fbd93e_0    conda-forge
openldap                  2.6.9                he970967_0    conda-forge
openssl                   3.4.0                h7b32b05_1    conda-forge
packaging                 24.2               pyhd8ed1ab_2    conda-forge
pandas                    2.2.3           py310h5eaa309_1    conda-forge
pathsimanalysis           1.2.0              pyhd8ed1ab_1    conda-forge
patsy                     1.0.1              pyhd8ed1ab_1    conda-forge
pcre2                     10.44                hba22ea6_2    conda-forge
pensa                     0.6.0                    pypi_0    pypi
pillow                    11.1.0          py310h7e6dc6c_0    conda-forge
pip                       25.0               pyh8b19718_0    conda-forge
pixman                    0.44.2               h29eaf8c_0    conda-forge
pthread-stubs             0.4               hb9d3cd8_1002    conda-forge
pycparser                 2.22               pyh29332c3_1    conda-forge
pyedr                     0.8.0              pyhd8ed1ab_1    conda-forge
pyparsing                 3.2.1              pyhd8ed1ab_0    conda-forge
pyside6                   6.8.2           py310hfd10a26_0    conda-forge
pysocks                   1.7.1              pyha55dd90_7    conda-forge
python                    3.10.0          h543edf9_3_cpython    conda-forge
python-dateutil           2.9.0.post0        pyhff2d567_1    conda-forge
python-tzdata             2025.1             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    5_cp310    conda-forge
pytng                     0.3.3           py310he95d665_1    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
qhull                     2020.2               h434a139_5    conda-forge
qt6-main                  6.8.2                h588cce1_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.32.3             pyhd8ed1ab_1    conda-forge
scikit-learn              1.6.1           py310h27f47ee_0    conda-forge
scipy                     1.15.1          py310hfa6ec8c_0    conda-forge
seaborn                   0.13.2               hd8ed1ab_3    conda-forge
seaborn-base              0.13.2             pyhd8ed1ab_3    conda-forge
setuptools                75.8.0             pyhff2d567_0    conda-forge
six                       1.17.0             pyhd8ed1ab_0    conda-forge
snappy                    1.2.1                h8bd8927_1    conda-forge
sqlite                    3.48.0               h9eae976_1    conda-forge
statsmodels               0.14.4          py310hf462985_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tidynamics                1.1.2              pyhd8ed1ab_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tornado                   6.4.2           py310ha75aee5_0    conda-forge
tqdm                      4.67.1             pyhd8ed1ab_1    conda-forge
tzdata                    2025a                h78e105d_0    conda-forge
unicodedata2              16.0.0          py310ha75aee5_0    conda-forge
urllib3                   2.3.0              pyhd8ed1ab_0    conda-forge
waterdynamics             1.2.0              pyhd8ed1ab_1    conda-forge
wayland                   1.23.1               h3e06ad9_0    conda-forge
wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
xcb-util                  0.4.1                hb711507_2    conda-forge
xcb-util-cursor           0.1.5                hb9d3cd8_0    conda-forge
xcb-util-image            0.4.0                hb711507_2    conda-forge
xcb-util-keysyms          0.4.1                hb711507_0    conda-forge
xcb-util-renderutil       0.3.10               hb711507_0    conda-forge
xcb-util-wm               0.4.2                hb711507_0    conda-forge
xkeyboard-config          2.43                 hb9d3cd8_0    conda-forge
xorg-libice               1.1.2                hb9d3cd8_0    conda-forge
xorg-libsm                1.2.5                he73a12e_0    conda-forge
xorg-libx11               1.8.11               h4f16b4b_0    conda-forge
xorg-libxau               1.0.12               hb9d3cd8_0    conda-forge
xorg-libxcomposite        0.4.6                hb9d3cd8_2    conda-forge
xorg-libxcursor           1.2.3                hb9d3cd8_0    conda-forge
xorg-libxdamage           1.1.6                hb9d3cd8_0    conda-forge
xorg-libxdmcp             1.1.5                hb9d3cd8_0    conda-forge
xorg-libxext              1.3.6                hb9d3cd8_0    conda-forge
xorg-libxfixes            6.0.1                hb9d3cd8_0    conda-forge
xorg-libxi                1.8.2                hb9d3cd8_0    conda-forge
xorg-libxrandr            1.5.4                hb9d3cd8_0    conda-forge
xorg-libxrender           0.9.12               hb9d3cd8_0    conda-forge
xorg-libxtst              1.2.5                hb9d3cd8_3    conda-forge
xorg-libxxf86vm           1.1.6                hb9d3cd8_0    conda-forge
xz                        5.6.4                hbcc6ac9_0    conda-forge
xz-gpl-tools              5.6.4                hbcc6ac9_0    conda-forge
xz-tools                  5.6.4                hb9d3cd8_0    conda-forge
zlib                      1.3.1                hb9d3cd8_2    conda-forge
zstandard                 0.23.0          py310ha39cb0e_1    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Thanks in advacne!

Copy link

github-actions bot commented Feb 5, 2025

Congras on the first issue!

@martinvoegele
Copy link
Collaborator

Hi, thanks for raising this issue!

It looks like the error appears in extract_coordinates(), i.e., during preprocessing, so it's not a clustering problem.

  1. Are you sure the xtc file exists? The error message also says:
OSError: File does not exist: b'/scratch_shared/MOR/prod4/output4.xtc'
  1. Is this something that occurs with the particular trajectory format you use? If you think loading this format requires the option refresh_offsets=True, you can try the following quick fix:
  • Define your own version of the function extract_coordinates() by copying the definition from here: https://github.com/drorlab/pensa/blob/master/pensa/preprocessing/coordinates.py
  • Add the option refresh_offsets=True to the two calls of mda.Universe() in your new function and replace extract_coordinates() with it in your script.

Please let me know how things go (even if it works) so I can think about how to improve this part of PENSA.

@martinvoegele martinvoegele added the bug Something isn't working label Feb 6, 2025
@martinvoegele martinvoegele self-assigned this Feb 6, 2025
@H-EKE
Copy link
Author

H-EKE commented Feb 7, 2025

Hi @martinvoegele

Thanks for your fast response! You were right—the issue was simply that the xtc file didn’t exist (too much hours in front of computer :)) . Apologies for the oversight, and thanks ahain your help!

@H-EKE H-EKE closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants