isambard icon indicating copy to clipboard operation
isambard copied to clipboard

Finding H-bonds and KIHs with Isambard2

Open broncio123 opened this issue 6 years ago • 1 comments

Hi,

I'm struggling to find a way with the ampal module to get all H-bonds (Sidechain-Sidechain, Sidechain-Mainchain, etc) and Knobs into Holes, given a PDB.

With previous isambard versions I used to do something like:

import isambard_dev

# Passed a PDB which already includes hydrogens		
p = isambard_dev.ampal.convert_pdb_to_ampal(pdb_path)

hbonds = isambard_dev.interactions.find_hydrogen_bonds(p)
# Find all H-bonds and select those between sidechain atoms
sc_hbonds = [hb for hb in hbonds if hb.is_sidechain_sidechain == True]

# Get donor/acceptor info
hb = sc_hbonds[0]
donor_H = [hb.donor.ampal_parent.id , hb.donor.res_label]
acceptor_O = [hb.acceptor.ampal_parent.id , hb.acceptor.res_label]

and

kihs = isambard_dev.add_ons.knobs_into_holes.find_kihs(p)

# Get KIH info
kih = kihs[0]
knob_data = kih.knob.unique_id
hole_data = [kih.hole[x].unique_id for x in range(len(kih.hole))]

I would appreciate any help so that I can upgrade my code to Isambard2.

Cheers, Broncio

broncio123 avatar Sep 01 '18 10:09 broncio123