Skip to content

Commit

Permalink
Hide dcdreader warning
Browse files Browse the repository at this point in the history
Checked and validated the warning is not relevant for this code, see: MDAnalysis/mdanalysis#3889
  • Loading branch information
RMCrean committed Apr 5, 2023
1 parent e13e715 commit 8d90fe5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions key_interactions_finder/contact_identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"VdW" - Unspecified VdW interaction.
"""
from typing import Tuple, Optional, List
import warnings

import pandas as pd
import numpy as np
Expand All @@ -32,6 +33,12 @@
HYDROPHOBIC_RESIDUES = ("ALA", "VAL", "LEU", "ILE", "PRO", "PHE", "Cys")


# From clarification on GitHub, this message can be safely ignored.
# https://github.com/MDAnalysis/mdanalysis/issues/3889
warnings.filterwarnings(
"ignore", message="DCDReader currently makes independent timesteps")


def calculate_contacts(parm_file: str,
traj_file: str,
out_file: str,
Expand Down Expand Up @@ -106,8 +113,8 @@ def calculate_contacts(parm_file: str,
contact_scores = []
for timestep in universe.trajectory:
res_res_dists = contacts.distance_array(
res1_atoms.positions.copy(),
res2_atoms.positions.copy()
res1_atoms.positions,
res2_atoms.positions
)
contact_score = _score_residue_contact(
res_res_dists=res_res_dists)
Expand Down

0 comments on commit 8d90fe5

Please sign in to comment.