We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07696e0 commit 82e4265Copy full SHA for 82e4265
AtomPacker/core/io/mol2/file.py
@@ -8,14 +8,16 @@
8
9
__all__ = ["load_mol2"]
10
11
-
+import warnings
12
from string import digits
13
14
-import numpy
15
from MDAnalysis import Universe
16
17
from ..vdw import _lookup_radii
18
+# Suppress MDAnalysis warnings
19
+warnings.filterwarnings("ignore", category=UserWarning)
20
+
21
22
def load_mol2(filename: str) -> Universe:
23
"""
@@ -46,9 +48,7 @@ def load_mol2(filename: str) -> Universe:
46
48
elements = [
47
49
atom.translate(str.maketrans("", "", digits))
50
# Convert any hydrogens to H
- .replace("HA", "H")
- .replace("HB", "H")
51
- .replace("HC", "H")
+ .replace("HA", "H").replace("HB", "H").replace("HC", "H")
52
for atom in universe.atoms.names
53
]
54
# Add elements to topology
0 commit comments