Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct base pair definitions in bondlength_defaults.py #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keitaroyam
Copy link
Member

Only single hydrogen bonds were defined for symmetric homo purine/pyrimidine pairs.

Only single hydrogen bonds were defined for symmetric homo purine/pyrimidine pairs.
@keitaroyam
Copy link
Member Author

@olegsobolev Can I merge these changes? I guess they were missed when transferring data from mmtbx/secondary_structure/base_pairing.data

@olegsobolev
Copy link
Contributor

Sorry for the delay.
If I understand your PR correctly, you want to define "mirror" information for some bond lengths, e.g. to define them not only for N6-N1, but also for N1-N6. If so, this looks like duplicating information. Did you take a look at
def get_basepair_target_distance(atom1, atom2, which_basepair)
just below this dictionary? This function is meant to take care of this kind of situation instead of increasing the number of constants in the dictionary. Although this function is not used in production, the dictionary itself is used. If this function does not provide the information you want or you have different inputs, I would rather add another wrapper function instead of changing the dictionary.
Here is some example code:

import iotbx.pdb
from mmtbx.monomer_library.bondlength_defaults import get_basepair_target_distance

h = iotbx.pdb.input("6gpi.pdb").construct_hierarchy()
asc = h.atom_selection_cache()

atom1 = h.select(asc.selection("name N1")).atoms()[0]
atom2 = h.select(asc.selection("name N6")).atoms()[0]
print atom1.id_str()
print atom2.id_str()
print get_basepair_target_distance(atom1, atom2, 1)
print get_basepair_target_distance(atom2, atom1, 1)

Output:

model="   1" pdb=" N1  F7H A   1 "
model="   1" pdb=" N6  TCY A   9 "
(2.99, 0.14, 0.07)
(2.99, 0.14, 0.07)

@keitaroyam
Copy link
Member Author

@olegsobolev Thank your for the reply. I meant the symmetric homo purine/pyrimidine pairs (classes I-IV, XII-XV) should have two hydrogen bonds for each, but only one is defined with the current code. It is duplicated information as you pointed out although this is an easy fix, so I will look for another place to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants