MolecularNodes icon indicating copy to clipboard operation
MolecularNodes copied to clipboard

Lipophilic potential

Open MonZop opened this issue 1 year ago • 6 comments

Hi Brady, I am truly amazed and admired of your excellent work! I am trying to use MolNodes, but the logic of nodes is somehow counterintuitive, at least for my brain configuration! However, I am studying, hopefully one day it will click, and things will become clear.

In the meanwhile, do you think it could be possible to attribute to atoms the value of lipophilic potential, similarly to what we used to do in BioBlender, but without the steps of texture mapping ? The procedure was based on a library of atomic potentials (for each aminoacid and atom) based on chemistry (i.e. a carboxylic Oxygen is not the same as an alcoholic one), derived form PyMLP (https://github.com/plantigrade/pyMLP). In BioBlender the library was extended to include atoms for DNA, RNA and some other small molecules.

When (if?) I will understand nodes, I might be able to do this by myself, but it could take some time.

Thanks again for you work! Monica

MonZop avatar Jul 18 '22 14:07 MonZop

Thanks Monica! Working with nodes is definitely a different way of thinking, and it takes a while to get it to 'flow' properly in your mind, but once it clicks it will definitely be worth it for the potential it unlocks!

Looking at the PyMLP library, it shouldn't actually be very difficult to implement the Lipophilic potential. If it is just a dictionary lookup based on the residue (AA or nucleic acid) and the atom name, then if you can provide a complete dictionary of values that you had in BioBlender then I could have a go at making those values available on import.

BradyAJohnston avatar Jul 18 '22 23:07 BradyAJohnston

Thanks Brady :-) The list is inside the pyMLP.py inBioBlender (BioBlender21-master\bin\pyMLP-1.0), but I cannot send such file here. I just copied all the values into a text, if it is more convenient. fi_values.odt

I'll be looking forward to anything you propose, including this enhancement.

MonZop avatar Jul 19 '22 13:07 MonZop

I have to mention that all values are from -1 to 1 (you probably noticed)

MonZop avatar Jul 19 '22 13:07 MonZop

Hi :)

Just in case you need it, here's the lipophobicity dictionnary in python format (the one in the odt was broken)

lipophobicity_dict = {'ALA': {'CB': 0.62,
                              'C': -0.61,
                              'CA': 0.02,
                              'O': -0.58,
                              'N': -0.49,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB1': 0.0,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'OXT': 0.49},
                      'ARG': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD': 0.45,
                              'CG': 0.45,
                              'CZ': -0.61,
                              'N': -0.49,
                              'NE': -0.49,
                              'NH1': -0.14,
                              'NH2': -0.69,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'HD2': -0.25,
                              'HD3': -0.25,
                              'HE': -0.5,
                              'HH11': -0.5,
                              'HH12': -0.5,
                              'HH21': -0.5,
                              'HH22': -0.5,
                              '1HH1': -0.5,
                              '2HH1': -0.5,
                              '1HH2': -0.5,
                              '2HH2': -0.5,
                              'OXT': 0.49},
                      'ASN': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.02,
                              'CG': -0.61,
                              'N': -0.49,
                              'ND2': -0.14,
                              'O': -0.58,
                              'OD1': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HD21': -0.5,
                              'HD22': -0.5,
                              '1HD2': -0.5,
                              '2HD2': -0.5,
                              'OXT': 0.49},
                      'ASP': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CG': -0.61,
                              'N': -0.49,
                              'O': -0.58,
                              'OD1': -0.58,
                              'OD2': 0.49,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'OXT': 0.49},
                      'CYS': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'N': -0.49,
                              'O': -0.58,
                              'SG': 0.29,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'OXT': 0.49},
                      'GLN': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD': -0.54,
                              'CG': 0.45,
                              'N': -0.49,
                              'NE2': -0.14,
                              'O': -0.58,
                              'OE1': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'HE21': -0.5,
                              'HE22': -0.5,
                              '1HE2': -0.5,
                              '2HE2': -0.5,
                              'OXT': 0.49},
                      'GLU': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD': -0.54,
                              'CG': 0.45,
                              'N': -0.49,
                              'O': -0.58,
                              'OE1': -0.58,
                              'OE2': 0.49,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'OXT': 0.49},
                      'GLY': {'C': -0.61,
                              'CA': 0.45,
                              'O': -0.58,
                              'N': -0.57,
                              'H': -0.5,
                              'HA': -0.25,
                              'HA2': 0.0,
                              'HA3': 0.0,
                              'OXT': 0.49},
                      'HIS': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD2': 0.31,
                              'CE1': 0.31,
                              'CG': 0.1,
                              'N': -0.49,
                              'ND1': 0.08,
                              'NE2': -1.14,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HD1': -0.5,
                              'HD2': -0.25,
                              'HE1': -0.25,
                              'OXT': 0.49},
                      'ILE': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.02,
                              'CD': 0.63,
                              'CD1': 0.63,
                              'CG1': 0.45,
                              'CG2': 0.63,
                              'N': -0.49,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB': 0.0,
                              'HG12': 0.0,
                              'HG13': 0.0,
                              'HG21': 0.0,
                              'HG22': 0.0,
                              'HG23': 0.0,
                              'HD11': 0.0,
                              'HD12': 0.0,
                              'HD13': 0.0,
                              '2HG1': 0.0,
                              '3HG1': 0.0,
                              '1HG2': 0.0,
                              '2HG2': 0.0,
                              '3HG2': 0.0,
                              '1HD1': 0.0,
                              '2HD1': 0.0,
                              '3HD1': 0.0,
                              'OXT': 0.49},
                      'LEU': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD1': 0.63,
                              'CD2': 0.63,
                              'CG': 0.02,
                              'N': -0.49,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG': 0.0,
                              'HD11': 0.0,
                              'HD12': 0.0,
                              'HD13': 0.0,
                              'HD21': 0.0,
                              'HD22': 0.0,
                              'HD23': 0.0,
                              '1HD1': 0.0,
                              '2HD1': 0.0,
                              '3HD1': 0.0,
                              '1HD2': 0.0,
                              '2HD2': 0.0,
                              '3HD2': 0.0,
                              'OXT': 0.49},
                      'LYS': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD': 0.45,
                              'CE': 0.45,
                              'CG': 0.45,
                              'N': -0.49,
                              'NZ': -1.07,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'HD2': 0.0,
                              'HD3': 0.0,
                              'HE2': -0.2,
                              'HE3': -0.2,
                              'HZ1': -0.5,
                              'HZ2': -0.5,
                              'HZ3': -0.5,
                              'OXT': 0.49,
                              },
                      'MET': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CE': 0.63,
                              'CG': 0.45,
                              'N': -0.49,
                              'O': -0.58,
                              'SD': -0.30,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'HE1': 0.0,
                              'HE2': 0.0,
                              'HE3': -0.5,
                              'OXT': 0.49,
                              },
                      'PHE': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD1': 0.31,
                              'CD2': 0.31,
                              'CE1': 0.31,
                              'CE2': 0.31,
                              'CG': 0.1,
                              'CZ': 0.31,
                              'N': -0.49,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HD1': 0.0,
                              'HD2': 0.0,
                              'HE1': 0.0,
                              'HE2': 0.0,
                              'HZ': 0.0,
                              'OXT': 0.49},
                      'PRO': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD': 0.45,
                              'CG': 0.45,
                              'N': -0.92,
                              'O': -0.58,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG2': 0.0,
                              'HG3': 0.0,
                              'HD2': -0.2,
                              'HD3': -0.2,
                              'OXT': 0.49, },
                      'SER': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'N': -0.49,
                              'O': -0.58,
                              'OG': -0.99,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HG': 0.0,
                              'OXT': 0.49, },
                      'THR': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.02,
                              'CG2': 0.62,
                              'N': -0.49,
                              'O': -0.58,
                              'OG1': -0.9,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB': 0.0,
                              'HG1': 0.0,
                              'HG21': 0.0,
                              'HG22': 0.0,
                              'HG23': 0.0,
                              '1HG2': 0.0,
                              '2HG2': 0.0,
                              '3HG2': 0.0,
                              'OXT': 0.49, },
                      'TRP': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD1': 0.31,
                              'CD2': 0.25,
                              'CE2': 0.25,
                              'CE3': 0.31,
                              'CG': 0.1,
                              'CH2': 0.31,
                              'CZ2': 0.31,
                              'CZ3': 0.31,
                              'N': -0.49,
                              'NE1': 0.08,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HE1': -0.5,
                              'HD1': -0.2,
                              'HE3': 0.0,
                              'HZ2': 0.0,
                              'HZ3': 0.0,
                              'HH2': 0.0,
                              'OXT': 0.49, },
                      'TYR': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.45,
                              'CD1': 0.31,
                              'CD2': 0.31,
                              'CE1': 0.31,
                              'CE2': 0.31,
                              'CG': 0.1,
                              'CZ': 0.1,
                              'N': -0.49,
                              'O': -0.58,
                              'OH': -0.17,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB2': 0.0,
                              'HB3': 0.0,
                              'HD1': 0.0,
                              'HD2': 0.0,
                              'HE1': 0.0,
                              'HE2': 0.0,
                              'HH': 0.0,
                              'OXT': 0.49, },
                      'VAL': {'C': -0.61,
                              'CA': 0.02,
                              'CB': 0.02,
                              'CG1': 0.62,
                              'CG2': 0.62,
                              'N': -0.49,
                              'O': -0.58,
                              'H': -0.5,
                              'HA': -0.25,
                              'HB': 0.0,
                              'HG11': 0.0,
                              'HG12': 0.0,
                              'HG13': 0.0,
                              'HG21': 0.0,
                              'HG22': 0.0,
                              'HG23': 0.0,
                              '1HG1': 0.0,
                              '2HG1': 0.0,
                              '3HG1': 0.0,
                              '1HG2': 0.0,
                              '2HG2': 0.0,
                              '3HG2': 0.0,
                              'OXT': 0.49, },
                      'CA': {'CA': -1.0},
                      'NAG': {'C1': 0.02,
                              'C2': 0.02,
                              'C3': 0.02,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.31,
                              'C7': -0.61,
                              'C8': 0.62,
                              'O1': -0.92,
                              'O2': -0.92,
                              'O3': -0.92,
                              'O4': -0.92,
                              'O5': -1.14,
                              'O6': -0.99,
                              'O7': -0.58,
                              'N2': -0.49,
                              'H2': -0.25,
                              'HN2': -0.5, },
                      'NDG': {'C1': 0.02,
                              'C2': 0.02,
                              'C3': 0.02,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.031,
                              'C7': -0.61,
                              'C8': 0.62,
                              'O1L': -0.9,
                              'O3': -0.92,
                              'O4': -0.92,
                              'O': -1.14,
                              'O6': -0.99,
                              'O7': -0.58,
                              'N2': -0.29, },
                      'BMA': {'C1': 0.02,
                              'C2': 0.02,
                              'C3': 0.02,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.31,
                              'O1': -0.92,
                              'O2': -0.92,
                              'O3': -0.92,
                              'O4': -0.92,
                              'O5': -1.14,
                              'O6': -0.58, },
                      'MAN': {'C1': 0.02,
                              'C2': 0.02,
                              'C3': 0.02,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.31,
                              'O1': -0.92,
                              'O2': -0.92,
                              'O3': -0.92,
                              'O4': -0.92,
                              'O5': -1.14,
                              'O6': -0.58, },
                      'GAL': {'C1': 0.02,
                              'C2': 0.02,
                              'C3': 0.02,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.31,
                              'O1': -0.92,
                              'O2': -0.92,
                              'O3': -0.92,
                              'O4': -0.92,
                              'O5': -1.14,
                              'O6': -0.58, },
                      'NAN': {'C1': -0.61,
                              'C2': 0.02,
                              'C3': 0.62,
                              'C4': 0.02,
                              'C5': 0.02,
                              'C6': 0.02,
                              'C7': 0.02,
                              'C8': 0.02,
                              'C9': 0.31,
                              'C10': -0.6,
                              'C11': 0.62,
                              'O1A': -0.2,
                              'O1B': -0.4,
                              'O2': -0.92,
                              'O4': -0.92,
                              'O6': -1.14,
                              'O7': -0.92,
                              'O8': -0.92,
                              'O9': -0.7,
                              'O10': -0.2,
                              'N5': -0.49,
                              'NH5': -0.5, },
                      'DG': {'P': -0.94,
                             'O1P': -0.7,
                             'O2P': -0.22,
                             "O5'": -0.5,
                             "C5'": 0.45,
                             "C4'": 0.02,
                             "O4'": -1.14,
                             "C1'": 0.02,
                             "C2'": 0.45,
                             "C3'": 0.02,
                             "O3'": -0.92,
                             'N9': -1.66,
                             'C8': 0.31,
                             'N7': -0.55,
                             'C5': 0.25,
                             'C6': 0.1,
                             'O6': -0.58,
                             'N1': -0.49,
                             'C2': 0.1,
                             'N2': -0.6,
                             'N3': -0.07,
                             'C4': -0.25, },
                      'DA': {'P': -0.94,
                             'O1P': -0.7,
                             'O2P': -0.22,
                             "O5'": -0.5,
                             "C5'": 0.45,
                             "C4'": 0.02,
                             "O4'": -1.14,
                             "C1'": 0.02,
                             "C2'": 0.45,
                             "C3'": 0.02,
                             "O3'": -0.92,
                             'N9': -1.66,
                             'C8': 0.31,
                             'N7': -0.55,
                             'C5': 0.25,
                             'C6': 0.1,
                             'N6': -0.6,
                             'N1': -0.49,
                             'C2': 0.31,
                             'N2': -0.6,
                             'N3': -0.07,
                             'C4': -0.25, },
                      'DC': {'P': -0.94,
                             'O1P': -0.7,
                             'O2P': -0.22,
                             "O5'": -0.5,
                             "C5'": 0.45,
                             "C4'": 0.02,
                             "O4'": -1.14,
                             "C1'": 0.02,
                             "C2'": 0.45,
                             "C3'": 0.02,
                             "O3'": -0.92,
                             'N1': -1.66,
                             'C2': 0.1,
                             'O2': -0.58,
                             'N3': -0.29,
                             'C4': 0.1,
                             'N4': -0.6,
                             'C5': 0.31,
                             'C6': 0.31},
                      'DT': {'P': -0.94,
                             'O1P': -0.7,
                             'O2P': -0.22,
                             "O5'": -0.5,
                             "C5'": 0.45,
                             "C4'": 0.02,
                             "O4'": -1.14,
                             "C1'": 0.02,
                             "C2'": 0.45,
                             "C3'": 0.02,
                             "O3'": -0.92,
                             'N1': -1.66,
                             'C2': 0.1,
                             'O2': -0.58,
                             'N3': 0.16,
                             'C4': 0.25,
                             'O4': -0.58,
                             'C5': 0.1,
                             'C6': 0.31,
                             'C7': 0.45},
                      'G': {'P': -0.94,
                            'O1P': -0.7,
                            'O2P': -0.22,
                            "O5'": -0.5,
                            "C5'": 0.45,
                            "C4'": 0.02,
                            "O4'": -1.14,
                            "C1'": 0.02,
                            "C2'": 0.02,
                            "O2'": -0.92,
                            "C3'": 0.02,
                            "O3'": -0.92,
                            'N9': -1.66,
                            'C8': 0.31,
                            'N7': -0.55,
                            'C5': 0.25,
                            'C6': 0.1,
                            'O6': -0.58,
                            'N1': -0.49,
                            'C2': 0.1,
                            'N2': -0.6,
                            'N3': -0.07,
                            'C4': -0.25},
                      'A': {'P': -0.94,
                            'O1P': -0.7,
                            'O2P': -0.22,
                            "O5'": -0.5,
                            "C5'": 0.45,
                            "C4'": 0.02,
                            "O4'": -1.14,
                            "C1'": 0.02,
                            "C2'": 0.02,
                            "O2'": -0.92,
                            "C3'": 0.02,
                            "O3'": -0.92,
                            'N9': -1.66,
                            'C8': 0.31,
                            'N7': -0.55,
                            'C5': 0.25,
                            'C6': 0.1,
                            'N6': -0.6,
                            'N1': -0.49,
                            'C2': 0.31,
                            'N2': -0.6,
                            'N3': -0.07,
                            'C4': -0.25},
                      'C': {'P': -0.94,
                            'O1P': -0.7,
                            'O2P': -0.22,
                            "O5'": -0.5,
                            "C5'": 0.45,
                            "C4'": 0.02,
                            "O4'": -1.14,
                            "C1'": 0.02,
                            "C2'": 0.02,
                            "O2'": -0.92,
                            "C3'": 0.02,
                            "O3'": -0.92,
                            'N1': -1.66,
                            'C2': 0.1,
                            'O2': -0.58,
                            'N3': -0.29,
                            'C4': 0.1,
                            'N4': -0.6,
                            'C5': 0.31,
                            'C6': 0.31},
                      'U': {'P': -0.94,
                            'O1P': -0.7,
                            'O2P': -0.22,
                            "O5'": -0.5,
                            "C5'": 0.45,
                            "C4'": 0.02,
                            "O4'": -1.14,
                            "C1'": 0.02,
                            "C2'": 0.02,
                            "O2'": -0.92,
                            "C3'": 0.02,
                            "O3'": -0.92,
                            'N1': -1.66,
                            'C2': 0.1,
                            'O2': -0.58,
                            'N3': 0.16,
                            'C4': 0.25,
                            'O4': -0.58,
                            'C5': 0.1,
                            'C6': 0.31},
                      }

tubiana avatar Jul 20 '22 19:07 tubiana

A temporary work arround @MonZop, with the dictionnary I paste juste before, is to write the lipophobicity to the Bfactor column and use it with a colorscale.

I use this code to change the bfactor column (put it in a python script and replace INPUT.PDB by your pdb file. :

outline = []
with open('INPUT.pdb','r') as filein: #Read input PDB file
    for i,line in enumerate(filein): #For each line
        resname = line[17:20].strip() #Take the Resname
        atomname = line[12:16].strip() #Take the atom name
        if line.startswith("ATOM"): #Do that for ATOMS line only
            try: #try to get the lipophobicity
                lipophobicity = lipophobicity_dict[resname][atomname]
            except KeyError: #If the key is not presend in the dictionnary... Just put 0 instead
                lipophobicity = 0
            newline = line[:60] + f"{lipophobicity:6.2f}" + line[66:] #Change the bfactore value
        else: #Case for all other lines
            newline = line 
        outline.append(newline) #Save the line

with open("INPUT_lipophobicity.pdb","w") as fileout: #Now overwrite the pdbfile with the new one :)
    for line in outline:
        fileout.write(line)

Then after loading the pdb with Brady's Molecular Node I added a map range connected to the bfactor (to map the min/max of lipophobicity values to 0,1) a color ramp and a Style Manual Color like described in the screenshot. image

It works with surface too :) image

And of course if you want you can play with the map range to adjust the color mapping image

tubiana avatar Jul 20 '22 20:07 tubiana

Thanks @tubiana ! It looks good! I will try to use it, also with complexes, possibly after I get back home (I am now on holiday, until August 8). It's really wonderful how this community responds, with working solution, and also fast!! THanks again!

MonZop avatar Jul 21 '22 08:07 MonZop

I've had a go at implementing this, and now that MN has been refactored, it's actually quite easy to add a new set of attributes / data to be added to the model on import.

I've made an initial branch #131 which adds this functionality based on the values provided, with the result shown below.

It works well. Are there other relatively simple dictionaries of values such as charge / electrostatics etc that would be straight forward to implement? If someone can point me to to them as dictionary as presented above, they could be added quite quickly.

image image

BradyAJohnston avatar Jan 02 '23 08:01 BradyAJohnston

Thank you Brady for the excellent work, as usual :-)

The two other features that might be interesting to show on molecular surfaces are the potential of H-bond and the Electrostatic potential (EP). In both cases, there are two aspects that should be considered, and I am not sure that a simple color-scale would be appropriate to deliver the information. One is that the two are directional, and the other is that they act a distance from the surface.

For H-bonding, I think that the propensity of each surface atom to donate or accept the bond could be represented by adding a small object, like a cone (without the base) in either direction, showing how pairing of two surfaces could be stabilized by the fitting of a donor-acceptor pair. I am not sure how this could be implemented in MN, because it would imply to add more points (objects) in the scene. Also, I am not aware of a table that lists the H-bond propensity of aminoacids, although I think there should be one out there.

For EP it could be more difficult, because the attraction/repulsion force is exerted at a much higher distance (relatively speaking), and is also more widespread: from the charged atom, the surrounding water distributes the charge in all directions. The part that goes back into the protein is quickly neutralized, but towards the medium the diffusion of the charge is dependent on the presence of other charges, including ions in the medium and charges in other proteins close by. In BioBlender we had adopted a solution that was very computational intensive, because we used APBS to calculate the charge density in the entire space of the protein(s), returned as a grid of values; then we used a custom program to select a subset of points on the protein, and draw lines (more lines for stronger charged atoms, less for slightly charged) along the gradient descent. The lines were then imported into Blender and tiny line particles were made to run along the lines (positive to negative). The result was very informative and (IMHO) quite good looking, but the time for all the calculations and the rendering was impossibly long, and in practice could only be used for isolated and not moving proteins (which is the case most of the times anyways). Furthermore, the intensity of the charges is different for different atoms on the protein surface, meaning that for each (partially) charged atom one should be able to display: the sign, the value, and the spread into the medium.

I have no idea of how this could be implemented in MN (actually I do have a little idea, but I have to think better about it, before I expose myself ).

MonZop avatar Jan 10 '23 14:01 MonZop

implemented in #131

BradyAJohnston avatar Aug 10 '23 09:08 BradyAJohnston