Skip to content

Commit

Permalink
Included more test files and test cases, and have created raise for o…
Browse files Browse the repository at this point in the history
…bmol's with more than 1 conformer as they cannnot be supported currently
  • Loading branch information
lunamorrow committed Aug 28, 2024
1 parent f95c0ac commit 2ae74d3
Show file tree
Hide file tree
Showing 7 changed files with 203,607 additions and 11 deletions.
3 changes: 3 additions & 0 deletions mda_openbabel_converter/OpenBabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def __init__(self, filename: OBMol, **kwargs):
"""
Converts file to OBMol to AtomGroup
"""
n_conf = filename.NumConformers()
if n_conf > 1:
raise("Reader does not support OBMol's with more than one conformer")
n_atoms = filename.NumAtoms()
coordinates = np.array([
[(coords := atom.GetVector()).GetX(),
Expand Down
310 changes: 302 additions & 8 deletions mda_openbabel_converter/data/1crn.pdb

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions mda_openbabel_converter/data/ChEBI_26355.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

Marvin 01281309122D

43 50 0 0 0 0 999 V2000
10.0400 -6.3601 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.9791 -5.4001 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
11.6887 -4.9827 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4191 -5.4001 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.3583 -6.3601 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.7757 -7.0697 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.3583 -7.7793 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.4191 -8.7393 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
11.6887 -9.1567 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.9791 -8.7393 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.0400 -7.7793 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.6226 -7.0697 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
12.5444 -6.2140 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
12.5444 -7.9253 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
10.8539 -7.9253 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
9.6643 -5.6088 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.8674 -5.3953 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.1497 -5.0244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.3632 -4.2275 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.7548 -8.5306 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.5516 -8.7441 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.6643 -8.5306 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.8674 -8.7441 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.2487 -5.0244 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.0352 -4.2275 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.2383 -4.0140 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.7548 -5.6088 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.5516 -5.3953 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.7652 -4.5984 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.2487 -9.1149 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.0352 -9.9118 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.2383 -10.1253 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.1497 -9.1149 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.3632 -9.9118 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.1601 -10.1253 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.2279 -11.1357 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
9.0248 -10.9222 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
9.6081 -11.5056 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
13.7902 -11.5056 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
14.3734 -10.9222 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.1703 -11.1357 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
10.8539 -6.2140 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
11.6887 -7.0697 0.0000 Fe 0 0 0 0 0 0 0 0 0 0 0 0
1 42 1 0 0 0 0
16 1 2 0 0 0 0
1 12 1 0 0 0 0
2 3 1 0 0 0 0
42 2 1 0 0 0 0
24 2 2 0 0 0 0
3 4 2 0 0 0 0
4 13 1 0 0 0 0
18 4 1 0 0 0 0
5 6 1 0 0 0 0
13 5 2 0 0 0 0
27 5 1 0 0 0 0
6 7 2 0 0 0 0
7 14 1 0 0 0 0
7 20 1 0 0 0 0
8 9 2 0 0 0 0
33 8 1 0 0 0 0
14 8 1 0 0 0 0
10 9 1 0 0 0 0
15 10 2 0 0 0 0
30 10 1 0 0 0 0
11 12 2 0 0 0 0
15 11 1 0 0 0 0
22 11 1 0 0 0 0
13 43 1 0 0 0 0
43 14 1 0 0 0 0
15 43 1 0 0 0 0
24 16 1 0 0 0 0
16 17 1 0 0 0 0
18 27 2 0 0 0 0
18 19 1 0 0 0 0
20 33 2 0 0 0 0
20 21 1 0 0 0 0
22 30 2 0 0 0 0
22 23 1 0 0 0 0
24 25 1 0 0 0 0
25 26 2 0 0 0 0
27 28 1 0 0 0 0
28 29 2 0 0 0 0
30 31 1 0 0 0 0
31 32 1 0 0 0 0
32 37 1 0 0 0 0
33 34 1 0 0 0 0
34 35 1 0 0 0 0
35 40 1 0 0 0 0
37 36 1 0 0 0 0
37 38 2 0 0 0 0
40 39 1 0 0 0 0
40 41 2 0 0 0 0
42 43 1 0 0 0 0
M END
Loading

0 comments on commit 2ae74d3

Please sign in to comment.