openff/interchange/components/mdtraj.py
def _get_num_h_bonds(mdtop):
    """Get the number of (covalent) bonds containing a hydrogen atom"""
    n_bonds_containing_hydrogen = 0

    for bond in mdtop.bonds:
        if md.element.hydrogen in (bond.atom1.element, bond.atom2.element):
            n_bonds_containing_hydrogen += 1

    return n_bonds_containing_hydrogen
Get the number of (covalent) bonds containing a hydrogen atom
Get the number of (covalent) bonds containing a hydrogen atom
Get the number of ( covalent ) bonds containing a hydrogen atom
def _get_num_h_bonds(mdtop):
    n_bonds_containing_hydrogen = 0
    for bond in mdtop.bonds:
        if md.element.hydrogen in (bond.atom1.element, bond.atom2.element):
            n_bonds_containing_hydrogen += 1
    return n_bonds_containing_hydrogen
def _get_num_h_bonds ( mdtop ) : n_bonds_containing_hydrogen = 0 for bond in mdtop . bonds : if md . element . hydrogen in ( bond . atom1 . element , bond . atom2 . element ) : n_bonds_containing_hydrogen += 1 return n_bonds_containing_hydrogen
Get the number of (covalent) bonds containing a hydrogen atom
Get the number of ( covalent ) bonds containing a hydrogen atom
"""Get the number of (covalent) bonds containing a hydrogen atom"""
mdtop