Commit 7aacdeb1 authored by John Chodera (MSKCC)'s avatar John Chodera (MSKCC)
Browse files

Fix test

parent 06b61c6e
......@@ -1103,7 +1103,7 @@ def _createResidueTemplate(residue):
"""
template = ForceField._TemplateData(residue.name)
for atom in residue.atoms():
template.atoms.append(ForceField._TemplateAtomData(atom.name, 'X', atom.element))
template.atoms.append(ForceField._TemplateAtomData(atom.name, None, atom.element))
for (atom1,atom2) in residue.internal_bonds():
template.addBondByName(atom1.name, atom2.name)
residue_atoms = [ atom for atom in residue.atoms() ]
......
......@@ -419,12 +419,12 @@ class TestForceField(unittest.TestCase):
# Create a ForceField object.
forcefield = ForceField('amber99sb.xml', 'tip3p.xml', StringIO(simple_ffxml_contents))
# Get list of unique unmatched residues.
[unique_unmatched_residues, templates] = forcefield.getUniqueUnmatchedResidues(pdb.topology)
[residues, templates] = forcefield.getUniqueUnmatchedResidues(pdb.topology)
# Add residue templates to forcefield.
for template in templates:
# Replace atom types.
for (template_atom, residue_atom) in zip(template.atoms, residue.atoms()):
template_atom.type = 'XXX'
for atom in template.atoms:
atom.type = 'XXX'
# Register the template.
forcefield.registerResidueTemplate(template)
# Parameterize system.
......
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