Commit 7ae182db by Kyle Beauchamp

Added more fixes.

parent 04eaddb7
...@@ -574,9 +574,9 @@ class PDBFixer(object): ...@@ -574,9 +574,9 @@ class PDBFixer(object):
Find nonstandard residues. Find nonstandard residues.
>>> fixer = PDBFixer(pdbid='1VII') >>> fixer = PDBFixer(pdbid='1VII')
>>> fixer.applyMutations(["ALA-57-GLY"])
>>> fixer.findMissingAtoms() >>> fixer.findMissingAtoms()
>>> fixer.addMissingAtoms() >>> fixer.addMissingAtoms()
>>> fixer.applyMutations(["ALA-57-GLY"])
>>> fixer.addMissingHydrogens(7.0) >>> fixer.addMissingHydrogens(7.0)
""" """
......
...@@ -18,10 +18,8 @@ def test_mutate_2(): ...@@ -18,10 +18,8 @@ def test_mutate_2():
fixer.applyMutations(["ALA-57-GLY", "SER-56-ALA"], "A") fixer.applyMutations(["ALA-57-GLY", "SER-56-ALA"], "A")
fixer.addMissingHydrogens(7.0) fixer.addMissingHydrogens(7.0)
temp_pdb = tempfile.NamedTemporaryFile() temp_pdb = tempfile.NamedTemporaryFile()
app.PDBFile.writeFile(fixer.topology, fixer.positions, temp_pdb) assert list(fixer.topology.residues())[16].name == "GLY", "Name of mutated residue did not change correctly!"
pdb = app.PDBFile(temp_pdb.name) assert list(fixer.topology.residues())[15].name == "ALA", "Name of mutated residue did not change correctly!"
assert list(pdb.topology.residues())[16].name == "GLY", "Name of mutated residue did not change correctly!"
assert list(pdb.topology.residues())[15].name == "ALA", "Name of mutated residue did not change correctly!"
@raises(ValueError) @raises(ValueError)
def test_mutate_3_fails(): def test_mutate_3_fails():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment