b44dc788d6eaf6fe53cb6468763b46a0c4c74a12,src/biotite/structure/charges.py,,partial_charges,#Any#Any#Any#,293

Before Change


    if 5 in nitrogen_bond_types:
        for i, element in enumerate(elements):
            if element != "C" and 5 in types[i]:
                types[i].sort()
                // Aromaticity implies molecular cyclicality, i. e. an
                // atom involved in an aromatic system has at least two
                // bonds with the aromatic bond type and at most
                second_max = types[i][-3]

After Change


    // single bonds or a double bond as well
    nitrogen_bond_types = types[elements == "N"]
    if 5 in nitrogen_bond_types:
        nitrogen_indices = np.unique(
            np.where(elements == "N")[0]
        )
        for i in nitrogen_indices:
            if 5 in types[i]:
                considered_row = types[i]
                considered_row.sort()
                // Aromaticity implies molecular cyclicality, i. e. an
                // atom involved in an aromatic system has at least two
                // bonds with the aromatic bond type
                // Nitrogen has at most three bonds if involved in an
                // aromatic system, where the third bond type is `single`
                // Therefore, the presence of a third bond type indicates
                // a sp3 hybridisation, whereas the absence of a third
                // bond type can be either due to sp2 hybridisation or
                // deprotonation
                // In order to account for this ambiguity, the charge is
                // considered in case that a third bond type is not
                // present
                try:
                    considered_row[-3]
                    bond_types[i] = 1
                except IndexError:
                    nitrogen_charge = charges[i]
                    if nitrogen_charge == -1:
                        bond_types[i] = 1
                    else:
                        bond_types[i] = 2
    damping = 1.0
    parameters = _get_parameters(
        elements, bond_types, amount_of_binding_partners
    )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: biotite-dev/biotite
Commit Name: b44dc788d6eaf6fe53cb6468763b46a0c4c74a12
Time: 2020-12-22
Author: anter.jacob@gmail.com
File Name: src/biotite/structure/charges.py
Class Name:
Method Name: partial_charges


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 9a4540b682074d3f84a2fc232cf2a832dc96bce7
Time: 2018-01-19
Author: wang.alex.c@gmail.com
File Name: src/aggregate_results.py
Class Name:
Method Name: latexify


Project Name: nipy/dipy
Commit Name: 1515fa64e1c94bca111980ed71b0423b891c5189
Time: 2015-11-13
Author: garyfallidis@gmail.com
File Name: dipy/reconst/dsi.py
Class Name:
Method Name: create_qtable