Hello all,

I've been looking at Pymol's code for sometime time now and yet the algorithm for addition of hydrogen atoms to molecules in Pymol is not clear to me..

I've traced the h_add function to OMOP_AddHydrogens in layer2/Executive.c:

    op.code = OMOP_AddHydrogens;        /* 4 passes completes the job */

I'd argue this "4 passes to complete the job" requirement is related with the algorithm in chempy/place.py that iterates over a "need" list of lists.

            need = [ [], [], [], [] ]

This list of lists hold info for heavy atoms that lack 1, 2, 3, or 4 atoms.

This seems quite logical. But then the H atoms added have names like H01, H02, etc, when they were correctly identified in chempy/proteins.py and have their names in protein_amber.py and protein_residues.py.

My main questions are: are there different treatments for proteins when it comes to H-addition? How are H-s added to say, Methane? (given a single C).


João [...] Rodrigues
@ http://doeidoei.wordpress.org