Skip to content

Commit

Permalink
View/color salt-bridge interactions differently from hydrogen bonds (…
Browse files Browse the repository at this point in the history
…PYMOL-3846)
  • Loading branch information
antonschrodin authored and JarrettSJohnson committed Jan 30, 2024
1 parent 465a281 commit 442d7ca
Show file tree
Hide file tree
Showing 7 changed files with 311 additions and 54 deletions.
1 change: 1 addition & 0 deletions data/setting_help.csv
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ sdf (default)","string","mol2","0"
"halogen_bond_as_acceptor_min_donor_angle","Halogen-bonds as acceptor minumum donor angle.","float","120.0","0"
"halogen_bond_as_acceptor_min_acceptor_angle","Halogen-bonds as acceptor minumum acceptor angle.","float","90.0","0"
"halogen_bond_as_acceptor_max_acceptor_angle","Halogen-bonds as acceptor maximum acceptor angle.","float","170.0","0"
"salt_bridge_distance","Salt-bridge maximum distance.","float","5.0","0"
"half_bonds","controls whether or not half-bonds are shown when only one of the two atoms is visible.","boolean","off","2"
"hash_max","controls the maximum amount of memory used by the various temporary 3D hash tables used in geometry generation and raytracing.","integer","depends","0"
"heavy_neighbor_cutoff","cutoff for finding heavy neighbors in measurements wizard.","float","3.5","0"
Expand Down
1 change: 1 addition & 0 deletions layer1/SettingInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ enum {
REC_f( 792, halogen_bond_as_acceptor_min_donor_angle , global , 120.0f ),
REC_f( 793, halogen_bond_as_acceptor_min_acceptor_angle , global , 90.0f ),
REC_f( 794, halogen_bond_as_acceptor_max_acceptor_angle , global , 170.0f ),
REC_f( 795, salt_bridge_distance , global , 5.0f ),

#ifdef SETTINGINFO_IMPLEMENTATION
#undef SETTINGINFO_IMPLEMENTATION
Expand Down
3 changes: 3 additions & 0 deletions layer2/ObjectDist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ ObjectDist *ObjectDistNewFromSele(PyMOLGlobals * G, ObjectDist * oldObj,
} else if (mode == 9) { // 9: halogen-bond interaction
I->DSet[a].reset(pymol::FindHalogenBondInteractions(G,
I->DSet[a].release(), sele1, state1, sele2, state2, cutoff, &dist));
} else if (mode == 10) { // 10: salt-bridge interaction
I->DSet[a].reset(pymol::FindSaltBridgeInteractions(G,
I->DSet[a].release(), sele1, state1, sele2, state2, cutoff, &dist));
} else {
I->DSet[a].reset(SelectorGetDistSet(
G, I->DSet[a].release(), sele1, state1, sele2, state2, mode, cutoff, &dist));
Expand Down
5 changes: 4 additions & 1 deletion layer3/Executive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9539,7 +9539,10 @@ pymol::Result<float> ExecutiveDistance(PyMOLGlobals* G, const char* nam,
SettingSet(cSetting_dash_color, "0xff8800" /* light red */, obj);
break;
case 9: // "halogen-bonds"
SettingSet(cSetting_dash_color, "0xff00ff" /* magenta */, obj);
SettingSet(cSetting_dash_color, "0xaa00ff" /* dark magenta */, obj);
break;
case 10: // "salted-bridge"
SettingSet(cSetting_dash_color, "0xff2eff" /* light magenta */, obj);
break;
}

Expand Down
Loading

0 comments on commit 442d7ca

Please sign in to comment.