vermouth/processors/canonicalize_modifications.py
def semantic_feasibility(self, node1, node2):
        """
        Returns True iff node1 and node2 should be considered equal. This means
        they are both either marked as PTM_atom, or not. If they both are PTM
        atoms, the elements need to match, and otherwise, the atomnames must
        match.
        """
        node1 = self.G1.nodes[node1]
        node2 = self.G2.nodes[node2]
        if node1.get('PTM_atom', False) == node2['PTM_atom']:
            if node2['PTM_atom']:
                # elements must match
                return node1['element'] == node2['element']
            else:
                # atomnames must match
                return node1['atomname'] == node2['atomname']
        else:
            return False

        Returns True iff node1 and node2 should be considered equal. This means
        they are both either marked as PTM_atom, or not. If they both are PTM
        atoms, the elements need to match, and otherwise, the atomnames must
        match.
        
Returns True iff node1 and node2 should be considered equal. This means
they are both either marked as PTM_atom, or not. If they both are PTM
atoms, the elements need to match, and otherwise, the atomnames must
match.
Returns True iff node1 and node2 should be considered equal . This means they are both either marked as PTM_atom or not . If they both are PTM atoms the elements need to match and otherwise the atomnames must match .
def semantic_feasibility(self, node1, node2):
        node1 = self.G1.nodes[node1]
        node2 = self.G2.nodes[node2]
        if node1.get('PTM_atom', False) == node2['PTM_atom']:
            if node2['PTM_atom']:
                return node1['element'] == node2['element']
            else:
                return node1['atomname'] == node2['atomname']
        else:
            return False
def semantic_feasibility ( self , node1 , node2 ) : node1 = self . G1 . nodes [ node1 ] node2 = self . G2 . nodes [ node2 ] if node1 . get ( 'PTM_atom' , False ) == node2 [ 'PTM_atom' ] : if node2 [ 'PTM_atom' ] : return node1 [ 'element' ] == node2 [ 'element' ] else : return node1 [ 'atomname' ] == node2 [ 'atomname' ] else : return False
Returns True iff node1 and node2 should be considered equal.
Returns True iff node1 and node2 should be considered equal .
"""
        Returns True iff node1 and node2 should be considered equal. This means
        they are both either marked as PTM_atom, or not. If they both are PTM
        atoms, the elements need to match, and otherwise, the atomnames must
        match.
        """ # elements must match # atomnames must match
self
node1
node2