Commit 01bca4b2 authored by jdurrant's avatar jdurrant
Browse files

Implemented detection of metal-coordination bonds.

parent 2ddb0a7e
......@@ -5,7 +5,8 @@ WIP
---
1. Can select multiple interactions at once.
2. PNG file included in download from "Save" button. Also, log.txt file, for those not comfortable with JSON.
2. PNG file included in download from "Save" button. Also, log.txt file, for
those not comfortable with JSON.
3. Bonds now color coded.
4. Certain interactions turned on by default.
5. Clear button changed to "Reset" because resets to default value.
......@@ -13,11 +14,15 @@ WIP
7. JSZip now dynamic import.
8. zip download now includes vmd state directory.
9. Vmd state file centers on ligand automatically.
10. changed hydrogen_bond_dist_cutoff and hydrogen_bond_angle_cutoff parameter names to hydrogen_halogen_bond_dist_cutoff
hydrogen_halogen_bond_angle_cutoff
11. Removed ability to toggle on and off cylinder interactions, to simplify UI. Always on for those interaction where appropriate.
10. changed hydrogen_bond_dist_cutoff and hydrogen_bond_angle_cutoff parameter
names to hydrogen_halogen_bond_dist_cutoff
hydrogen_halogen_bond_angle_cutoff
11. Removed ability to toggle on and off cylinder interactions, to simplify UI.
Always on for those interaction where appropriate.
12. Some interactions are shown as spheres, others as bonds. Keeps it simplier.
13. Improved ability to detect salt bridges and hydrogen bonds even if protein and ligand models do not have hydrogen atoms.
13. Improved ability to detect salt bridges and hydrogen bonds even if protein
and ligand models do not have hydrogen atoms.
14. Speed improvements
TODO:
......@@ -30,7 +35,29 @@ Test should also test version of protein without hydrogens
If you add in new receptor or ligand, be sure to reevaluate whether warning
should appear.
Don't appear in table if it's not actually shown (so if deteting nothing, hide).
# Metal Bonds
Great site: https://chem.libretexts.org/Bookshelves/General_Chemistry/Chemistry_(OpenSTAX)/19%3A_Transition_Metals_and_Coordination_Chemistry/19.2%3A_Coordination_Chemistry_of_Transition_Metals
These can form metal bonds:
N
O
Cl
F
Br
I
How about calculate all L-M-L angles. Some will be too big (e.g., 180). But just
keep lower ones (like all within tolerance of min value). Average. See
deviation. Etc.
On file input, really modularize these. Separate widgets for input, removing
ligans, selecting between existing, etc. These shouldn't modify vuex store
directly (to keep broad).
METAL_COORDINATION_CUTOFF. Get into web app, documentation, parameters, etc.
Make sure all documentation/examples account for get_all_interactions (updated for metal coordination)
2.0
---
......
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
var __name__ = '__future__';
export var all_feature_names = [];
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:06
// Transcrypt'ed from Python, 2021-11-12 01:16:44
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import * as __module_binana__ from './binana.js';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:06
// Transcrypt'ed from Python, 2021-11-12 01:16:44
var __future__ = {};
var binana = {};
var math = {};
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
var math = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
......@@ -18,6 +18,7 @@ __nest__ (binana, '', __module_binana__);
import * as __module_math__ from './math.js';
__nest__ (math, '', __module_math__);
var __name__ = 'binana._structure.atom';
export var to_deg = 180.0 / math.pi;
export var Atom = __class__ ('Atom', [object], {
__module__: __name__,
get __init__ () {return __get__ (this, function (self) {
......@@ -181,14 +182,17 @@ export var Atom = __class__ ('Atom', [object], {
}
return __accu0__;
}) ();
var ncrs_len = len (ncrs);
if (ncrs_len <= 1) {
return true;
}
var ccr = self.coordinates;
var to_deg = 180.0 / math.pi;
var angles = [angle_between_three_points (ncrs [0], ccr, ncrs [1]) * to_deg];
if (len (ncrs) > 2) {
if (ncrs_len > 2) {
angles.append (angle_between_three_points (ncrs [0], ccr, ncrs [2]) * to_deg);
angles.append (angle_between_three_points (ncrs [1], ccr, ncrs [2]) * to_deg);
}
if (len (ncrs) > 3) {
if (ncrs_len > 3) {
angles.append (angle_between_three_points (ncrs [0], ccr, ncrs [3]) * to_deg);
angles.append (angle_between_three_points (ncrs [1], ccr, ncrs [3]) * to_deg);
angles.append (angle_between_three_points (ncrs [2], ccr, ncrs [3]) * to_deg);
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
var math = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
var math = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
var __name__ = 'binana._utils';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:06
// Transcrypt'ed from Python, 2021-11-12 01:16:44
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
var __name__ = 'binana._utils.shim';
export var fake_fs = dict ({});
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {_set_default} from './binana._utils.shim.js';
var __name__ = 'binana._utils.utils';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:08
// Transcrypt'ed from Python, 2021-11-12 01:16:46
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {OpenFile} from './binana._utils.shim.js';
......@@ -10,7 +10,7 @@ import * as shim from './binana._utils.shim.js';
import * as _utils from './binana._utils.js';
import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
export {shim, OpenFile, _utils};
export {shim, _utils, OpenFile};
var __name__ = 'binana.fs';
export var save_file = function (filename, text) {
var f = OpenFile (filename, 'w');
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:08
// Transcrypt'ed from Python, 2021-11-12 01:16:46
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {project_point_onto_plane} from './binana._utils._math_functions.js';
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {Mol} from './binana._structure.mol.js';
......@@ -21,15 +21,13 @@ export var get_close = function (ligand, receptor, cutoff) {
var ligand_receptor_atom_type_pairs_close = dict ({});
var pdb_close_contacts = Mol ();
var close_contacts_labels = [];
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < cutoff) {
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_close, list_alphebetize_and_combine (list_ligand_atom));
pdb_close_contacts.add_new_atom (ligand_atom.copy_of ());
pdb_close_contacts.add_new_atom (receptor_atom.copy_of ());
close_contacts_labels.append (tuple ([ligand_atom.string_id (), receptor_atom.string_id ()]));
}
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff);
for (var [i, [ligand_atom, receptor_atom, dist]] of enumerate (ligand_receptor_dists)) {
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_close, list_alphebetize_and_combine (list_ligand_atom));
pdb_close_contacts.add_new_atom (ligand_atom.copy_of ());
pdb_close_contacts.add_new_atom (receptor_atom.copy_of ());
close_contacts_labels.append (tuple ([ligand_atom.string_id (), receptor_atom.string_id ()]));
}
return dict ({'counts': ligand_receptor_atom_type_pairs_close, 'mol': pdb_close_contacts, 'labels': close_contacts_labels});
};
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {Mol} from './binana._structure.mol.js';
......@@ -21,15 +21,13 @@ export var get_closest = function (ligand, receptor, cutoff) {
var ligand_receptor_atom_type_pairs_closest = dict ({});
var pdb_closest_contacts = Mol ();
var closest_contacts_labels = [];
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff);
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < cutoff) {
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_closest, list_alphebetize_and_combine (list_ligand_atom));
pdb_closest_contacts.add_new_atom (ligand_atom.copy_of ());
pdb_closest_contacts.add_new_atom (receptor_atom.copy_of ());
closest_contacts_labels.append (tuple ([ligand_atom.string_id (), receptor_atom.string_id ()]));
}
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_closest, list_alphebetize_and_combine (list_ligand_atom));
pdb_closest_contacts.add_new_atom (ligand_atom.copy_of ());
pdb_closest_contacts.add_new_atom (receptor_atom.copy_of ());
closest_contacts_labels.append (tuple ([ligand_atom.string_id (), receptor_atom.string_id ()]));
}
return dict ({'counts': ligand_receptor_atom_type_pairs_closest, 'mol': pdb_closest_contacts, 'labels': closest_contacts_labels});
};
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {hashtable_entry_add_one, list_alphebetize_and_combine} from './binana._utils.utils.js';
......@@ -18,15 +18,13 @@ export var get_electrostatic_energies = function (ligand, receptor, cutoff) {
};
var cutoff = _set_default (cutoff, ELECTROSTATIC_DIST_CUTOFF);
var ligand_receptor_atom_type_pairs_electrostatic = dict ({});
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff);
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < cutoff) {
var ligand_charge = ligand_atom.charge;
var receptor_charge = receptor_atom.charge;
var coulomb_energy = ((ligand_charge * receptor_charge) / dist) * 1389423.8460104696;
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_electrostatic, list_alphebetize_and_combine (list_ligand_atom), coulomb_energy);
}
var ligand_charge = ligand_atom.charge;
var receptor_charge = receptor_atom.charge;
var coulomb_energy = ((ligand_charge * receptor_charge) / dist) * 1389423.8460104696;
var list_ligand_atom = [ligand_atom.atom_type, receptor_atom.atom_type];
hashtable_entry_add_one (ligand_receptor_atom_type_pairs_electrostatic, list_alphebetize_and_combine (list_ligand_atom), coulomb_energy);
}
return dict ({'counts': ligand_receptor_atom_type_pairs_electrostatic});
};
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {Mol} from './binana._structure.mol.js';
......@@ -24,27 +24,25 @@ export var get_flexibility = function (ligand, receptor, cutoff) {
var pdb_contacts_other_2nd_structure = Mol ();
var pdb_back_bone = Mol ();
var pdb_side_chain = Mol ();
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff);
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < cutoff) {
var flexibility_key = (receptor_atom.side_chain_or_backbone () + '_') + receptor_atom.structure;
if (receptor_atom.structure == 'ALPHA') {
pdb_contacts_alpha_helix.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.structure == 'BETA') {
pdb_contacts_beta_sheet.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.structure == 'OTHER') {
pdb_contacts_other_2nd_structure.add_new_atom (receptor_atom.copy_of ());
}
if (receptor_atom.side_chain_or_backbone () == 'BACKBONE') {
pdb_back_bone.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.side_chain_or_backbone () == 'SIDECHAIN') {
pdb_side_chain.add_new_atom (receptor_atom.copy_of ());
}
hashtable_entry_add_one (active_site_flexibility, flexibility_key);
var flexibility_key = (receptor_atom.side_chain_or_backbone () + '_') + receptor_atom.structure;
if (receptor_atom.structure == 'ALPHA') {
pdb_contacts_alpha_helix.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.structure == 'BETA') {
pdb_contacts_beta_sheet.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.structure == 'OTHER') {
pdb_contacts_other_2nd_structure.add_new_atom (receptor_atom.copy_of ());
}
if (receptor_atom.side_chain_or_backbone () == 'BACKBONE') {
pdb_back_bone.add_new_atom (receptor_atom.copy_of ());
}
else if (receptor_atom.side_chain_or_backbone () == 'SIDECHAIN') {
pdb_side_chain.add_new_atom (receptor_atom.copy_of ());
}
hashtable_entry_add_one (active_site_flexibility, flexibility_key);
}
return dict ({'counts': active_site_flexibility, 'mols': dict ({'alpha_helix': pdb_contacts_alpha_helix, 'beta_sheet': pdb_contacts_beta_sheet, 'other_2nd_structure': pdb_contacts_other_2nd_structure, 'back_bone': pdb_back_bone, 'side_chain': pdb_side_chain})});
};
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var __future__ = {};
var binana = {};
var math = {};
......@@ -22,17 +22,16 @@ import {HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF, HYDROGEN_HALOGEN_BOND_DIST_CUTOFF} f
import {_set_default} from './binana._utils.shim.js';
var __name__ = 'binana.interactions._hydrogen_halogen_bonds';
export var _get_potential_donors_acceptors = function (ligand, receptor, dist_cutoff) {
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
var close_donors_acceptors = (function () {
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, dist_cutoff);
return (function () {
var __accu0__ = [];
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < dist_cutoff && __in__ (ligand_atom.element, ['O', 'N']) && __in__ (receptor_atom.element, ['O', 'N'])) {
if (__in__ (ligand_atom.element, ['O', 'N']) && __in__ (receptor_atom.element, ['O', 'N'])) {
__accu0__.append ([ligand_atom, receptor_atom]);
}
}
return __accu0__;
}) ();
return close_donors_acceptors;
};
export var _update_mol_and_data = function (pdb_hbonds, hbonds, hbonds_labels, lig_donor_or_accept, receptor_atom, ligand_atom, center_atom) {
var comment = (lig_donor_or_accept == 'ACCEPTOR' ? 'RECEPTOR' : 'LIGAND');
......
......@@ -2,7 +2,7 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {Mol} from './binana._structure.mol.js';
......@@ -21,9 +21,9 @@ export var get_hydrophobics = function (ligand, receptor, cutoff) {
var hydrophobics = dict ({});
var pdb_hydrophobic = Mol ();
var hydrophobic_labels = [];
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff);
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (dist < cutoff && ligand_atom.element == 'C' && receptor_atom.element == 'C') {
if (ligand_atom.element == 'C' && receptor_atom.element == 'C') {
var hydrophobic_key = (receptor_atom.side_chain_or_backbone () + '_') + receptor_atom.structure;
pdb_hydrophobic.add_new_atom (ligand_atom.copy_of ());
pdb_hydrophobic.add_new_atom (receptor_atom.copy_of ());
......
......@@ -2,11 +2,10 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
// Transcrypt'ed from Python, 2021-11-09 23:51:07
// Transcrypt'ed from Python, 2021-11-12 01:16:45
var binana = {};
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
import {hashtable_entry_add_one, list_alphebetize_and_combine} from './binana._utils.utils.js';
import {_get_ligand_receptor_dists} from './binana.load_ligand_receptor.js';
import {hashtable_entry_add_one} from './binana._utils.utils.js';
import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
var __name__ = 'binana.interactions._ligand_atom_types';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment