Skip to content

Commit

Permalink
update pdb
Browse files Browse the repository at this point in the history
  • Loading branch information
RMeli committed Dec 27, 2024
1 parent 79fe534 commit 48b53a4
Showing 1 changed file with 11 additions and 66 deletions.
77 changes: 11 additions & 66 deletions testsuite/MDAnalysisTests/topology/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,39 +283,16 @@ def test_PDB_elements():
properly given a PDB file with valid elements record.
"""
u = mda.Universe(PDB_elements, format="PDB")
# fmt: off
element_list = np.array(
[
"N",
"C",
"C",
"O",
"C",
"C",
"O",
"N",
"H",
"H",
"H",
"H",
"H",
"H",
"H",
"H",
"Cu",
"Fe",
"Mg",
"Ca",
"S",
"O",
"C",
"C",
"S",
"O",
"C",
"C",
'N', 'C', 'C', 'O', 'C', 'C', 'O', 'N', 'H', 'H', 'H', 'H', 'H',
'H', 'H', 'H', 'Cu', 'Fe', 'Mg', 'Ca', 'S', 'O', 'C', 'C', 'S',
'O', 'C', 'C'
],
dtype=object,
dtype=object
)
# fmt: on
assert_equal(u.atoms.elements, element_list)


Expand Down Expand Up @@ -417,47 +394,15 @@ def test_PDB_charges():
properly given a PDB file with a valid formal charges record.
"""
u = mda.Universe(PDB_charges)
# fmt: on
formal_charges = np.array(
[
0,
0,
0,
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
],
dtype=int,
dtype=int
)
# fmt: off
assert_equal(u.atoms.formalcharges, formal_charges)


Expand Down

0 comments on commit 48b53a4

Please sign in to comment.