Skip to content

Commit

Permalink
made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csbrasnett committed Oct 23, 2023
1 parent 81d9f71 commit 3c643ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 3 additions & 4 deletions vermouth/processors/annotate_mut_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,9 @@ def annotate_modifications(molecule, modifications, mutations):
for node_idx in res['graph']:
molecule.nodes[node_idx][key] = molecule.nodes[node_idx].get(key, []) + [mod]
if mod_found == False:
LOGGER.warning('{} with resid {} not found. '
'No modification made.'
''.format(resspec['resname'], resspec['resid']))

LOGGER.warning('Mutation "{}" not found. '
'Check target resid!'
''.format(_format_resname(resspec)))

class AnnotateMutMod(Processor):
"""
Expand Down
6 changes: 2 additions & 4 deletions vermouth/tests/test_annotate_mut_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import networkx as nx
import pytest
from contextlib import nullcontext as does_not_raise
import logging
from vermouth.molecule import Molecule
from vermouth.forcefield import ForceField
from vermouth.processors.annotate_mut_mod import (
Expand Down Expand Up @@ -291,8 +289,8 @@ def test_nter_cter_modifications(node_data, edge_data, expected):
mol = Molecule(force_field=ForceField(FF_UNIVERSAL_TEST))
mol.add_nodes_from(enumerate(node_data))
mol.add_edges_from(edge_data)
modification = [({'resname': 'cter', 'resid': 3}, 'C-ter'),
({'resname': 'nter', 'resid': 1}, 'N-ter')]
modification = [({'resname': 'cter'}, 'C-ter'),
({'resname': 'nter'}, 'N-ter')]

annotate_modifications(mol, modification, [])

Expand Down

0 comments on commit 3c643ae

Please sign in to comment.