Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIxing modeller bug for WT case #1074

Merged
merged 4 commits into from
Aug 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Yank/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ def apply_mutations_modeller(value):

else:
logger.info('modeller: No mutations will be applied since "WT" specified.')
alignment.append_model(model, align_codes='WT')

process_tool_directive(directives, 'apply_mutations', apply_mutations_modeller, None)

Expand Down
18 changes: 16 additions & 2 deletions Yank/tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ def test_validation_correct_molecules():
{'filepath': paths['abl'], 'select': 'all', 'pdbfixer': {'replace_nonstandard_residues': True}},
{'filepath': paths['abl'], 'select': 'all', 'pdbfixer': {'apply_mutations': {'chain_id': 'A', 'mutations': 'T85I'}}},
{'filepath': paths['abl'], 'select': 'all', 'modeller': {'apply_mutations': {'chain_id': 'A', 'mutations': 'T85I'}}},
{'filepath': paths['abl'], 'select': 'all', 'modeller': {'apply_mutations': {'chain_id': 'A', 'mutations': 'WT'}}},
{'filepath': paths['abl'], 'select': 'all', 'pdbfixer': {'apply_mutations': {'chain_id': 'A', 'mutations': 'I8A/T9A'}}},
{'filepath': paths['toluene'], 'leap': {'parameters': 'leaprc.gaff'}},
{'filepath': paths['benzene'], 'epik': {'select': 1, 'tautomerize': False}},
Expand Down Expand Up @@ -1335,7 +1336,21 @@ def test_modeller_mutations():
exp_builder._db._setup_molecules(mol_id)
assert not os.path.exists(output_path)

# Now we set the strip_protons options and repeat
# Calling modeller with WT creates a file (although the protein is not mutated).
exp_builder._db.molecules[mol_id]['modeller'] = {
'apply_mutations': {
'chain_id': 'A',
'mutations': 'WT',
}
}
setup_molecule_output_check(exp_builder._db, mol_id, output_path)
os.remove(output_path) # Remove file for next check.


# Reinitialize exp_builder
exp_builder = ExperimentBuilder(yaml_content)

# Now we set the strip_protons options and repeat for the mutant case
exp_builder._db.molecules[mol_id]['modeller'] = {
'apply_mutations': {
'chain_id': 'A',
Expand All @@ -1353,7 +1368,6 @@ def test_modeller_mutations():
break
assert has_mut_residue


def test_pdbfixer_processing():
"""Test that PDB fixer correctly parses and sets up the molecules"""
mol_id = 'Abl'
Expand Down