Commit 063873b2 authored by jdurrant's avatar jdurrant
Browse files

Before removing cruft from old hydrogen/halogen-bond code.

parent 6c2f57df
......@@ -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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:33
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 {fabs} from './binana._utils.shim.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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:33
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';
......@@ -30,24 +30,28 @@ export var get_salt_bridges = function (ligand, receptor, cutoff) {
}
var key = 'SALT-BRIDGE_' + structure;
for (var index of receptor_charge.indices) {
pdb_salt_bridges.add_new_atom (receptor.all_atoms [index].copy_of ());
var idx = int (index);
var atom = receptor.all_atoms [idx];
pdb_salt_bridges.add_new_atom (atom.copy_of ());
}
for (var index of ligand_charge.indices) {
pdb_salt_bridges.add_new_atom (ligand.all_atoms [index].copy_of ());
var idx = int (index);
var atom = ligand.all_atoms [idx];
pdb_salt_bridges.add_new_atom (atom.copy_of ());
}
hashtable_entry_add_one (salt_bridges, key);
salt_bridge_labels.append (tuple ([('[' + ' / '.join ((function () {
var __accu0__ = [];
for (var index of ligand_charge.indices) {
__accu0__.append (ligand.all_atoms [index].string_id ());
__accu0__.append (ligand.all_atoms [int (index)].string_id ());
}
return __accu0__;
return py_iter (__accu0__);
}) ())) + ']', ('[' + ' / '.join ((function () {
var __accu0__ = [];
for (var index of receptor_charge.indices) {
__accu0__.append (receptor.all_atoms [index].string_id ());
__accu0__.append (receptor.all_atoms [int (index)].string_id ());
}
return __accu0__;
return py_iter (__accu0__);
}) ())) + ']']));
}
}
......
......@@ -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-05 16:24:08
// Transcrypt'ed from Python, 2021-11-09 00:25:32
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.interactions.default_params';
export var CLOSE_CONTACTS_DIST1_CUTOFF = 2.5;
......
......@@ -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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:33
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 _closest from './binana.interactions._closest.js';
......@@ -22,7 +22,7 @@ __nest__ (binana, '', __module_binana__);
import {ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF, CATION_PI_DIST_CUTOFF, CLOSE_CONTACTS_DIST1_CUTOFF, CLOSE_CONTACTS_DIST2_CUTOFF, ELECTROSTATIC_DIST_CUTOFF, HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF, HYDROGEN_HALOGEN_BOND_DIST_CUTOFF, HYDROPHOBIC_DIST_CUTOFF, PI_PADDING_DIST, PI_PI_INTERACTING_DIST_CUTOFF, PI_STACKING_ANGLE_TOLERANCE, SALT_BRIDGE_DIST_CUTOFF, T_STACKING_ANGLE_TOLERANCE, T_STACKING_CLOSEST_DIST_CUTOFF} from './binana.interactions.default_params.js';
import {_set_default} from './binana._utils.shim.js';
import * as default_params from './binana.interactions.default_params.js';
export {CLOSE_CONTACTS_DIST2_CUTOFF, _cat_pi, PI_PADDING_DIST, _flexibility, CATION_PI_DIST_CUTOFF, _closest, _electrostatic_energies, default_params, HYDROPHOBIC_DIST_CUTOFF, CLOSE_CONTACTS_DIST1_CUTOFF, SALT_BRIDGE_DIST_CUTOFF, _hydrophobics, T_STACKING_ANGLE_TOLERANCE, _close, _ligand_atom_types, HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF, ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF, ELECTROSTATIC_DIST_CUTOFF, _set_default, PI_PI_INTERACTING_DIST_CUTOFF, _salt_bridges, HYDROGEN_HALOGEN_BOND_DIST_CUTOFF, T_STACKING_CLOSEST_DIST_CUTOFF, PI_STACKING_ANGLE_TOLERANCE, _hydrogen_halogen_bonds, _pi_pi};
export {HYDROPHOBIC_DIST_CUTOFF, default_params, T_STACKING_ANGLE_TOLERANCE, HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF, PI_PADDING_DIST, _pi_pi, _salt_bridges, PI_STACKING_ANGLE_TOLERANCE, ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF, _hydrophobics, _electrostatic_energies, _flexibility, _hydrogen_halogen_bonds, T_STACKING_CLOSEST_DIST_CUTOFF, CLOSE_CONTACTS_DIST1_CUTOFF, CLOSE_CONTACTS_DIST2_CUTOFF, SALT_BRIDGE_DIST_CUTOFF, _ligand_atom_types, _closest, _close, CATION_PI_DIST_CUTOFF, PI_PI_INTERACTING_DIST_CUTOFF, HYDROGEN_HALOGEN_BOND_DIST_CUTOFF, _set_default, _cat_pi, ELECTROSTATIC_DIST_CUTOFF};
var __name__ = 'binana.interactions';
export var get_cation_pi = function (ligand, receptor, cutoff, pi_padding) {
if (typeof cutoff == 'undefined' || (cutoff != null && cutoff.hasOwnProperty ("__kwargtrans__"))) {;
......
......@@ -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-05 16:24:08
// Transcrypt'ed from Python, 2021-11-09 00:25:32
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 _get_params from './binana._cli_params._get_params.js';
......@@ -13,7 +13,7 @@ import * as load_ligand_receptor from './binana.load_ligand_receptor.js';
import * as fs from './binana.fs.js';
import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
export {fs, output, _get_params, interactions, load_ligand_receptor, _start};
export {fs, _get_params, _start, output, interactions, load_ligand_receptor};
var __name__ = '__main__';
export var _sys = binana.sys;
export var run = function (args) {
......
......@@ -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-05 16:24:08
// Transcrypt'ed from Python, 2021-11-09 00:25:32
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';
......@@ -13,7 +13,7 @@ import * as __module_math__ from './math.js';
__nest__ (math, '', __module_math__);
import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
export {_Point, _Mol, _math_functions};
export {_math_functions, _Point, _Mol};
var __name__ = 'binana.load_ligand_receptor';
export var _ligand_receptor_dists = null;
export var _ligand_receptor_aromatic_dists = null;
......
......@@ -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-05 16:24:10
// Transcrypt'ed from Python, 2021-11-09 00:25:34
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 shim from './binana._utils.shim.js';
......@@ -10,7 +10,7 @@ import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
import * as vmd_state from './binana.output._directory.vmd_state.js';
import * as pdbs from './binana.output._directory.pdbs.js';
export {vmd_state, pdbs, shim};
export {pdbs, vmd_state, shim};
var __name__ = 'binana.output._directory';
export var os = shim;
export var make_directory_output = function (parameters, closest, close, active_site_flexibility, hydrophobics, hydrogen_bonds, halogen_bonds, pi_pi, cat_pi, salt_bridges, ligand, receptor) {
......
......@@ -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-05 16:24:10
// Transcrypt'ed from Python, 2021-11-09 00:25:34
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.output._directory.pdbs';
export var output_dir_pdbs = function (pdb_closest_contacts, parameters, pdb_close_contacts, pdb_contacts_alpha_helix, pdb_contacts_beta_sheet, pdb_contacts_other_2nd_structure, pdb_back_bone, pdb_side_chain, pdb_hydrophobic, pdb_hbonds, pdb_halbonds, pdb_pistack, pdb_pi_T, pdb_pi_cat, pdb_salt_bridges, ligand, receptor) {
......
......@@ -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-05 16:24:10
// Transcrypt'ed from Python, 2021-11-09 00:25:34
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';
......
......@@ -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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:34
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 json from './binana._utils.shim.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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:34
var binana = {};
var re = {};
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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:33
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 as _openFile} from './binana._utils.shim.js';
......@@ -13,7 +13,7 @@ import * as pdb_file from './binana.output.pdb_file.js';
import * as _log from './binana.output._log.js';
import * as dictionary from './binana.output.dictionary.js';
import * as _directory from './binana.output._directory.js';
export {_directory, _openFile, dictionary, _json, pdb_file, _log};
export {_openFile, _directory, _json, dictionary, pdb_file, _log};
var __name__ = 'binana.output';
export var _write_main = function (parameters, ligand, receptor, closest, close, hydrophobics, hydrogen_bonds, halogen_bonds, salt_bridges, pi_pi, cat_pi, electrostatic_energies, active_site_flexibility, ligand_atom_types) {
var json_output = binana.output.dictionary.collect (closest, close, hydrophobics, hydrogen_bonds, halogen_bonds, salt_bridges, pi_pi, cat_pi, electrostatic_energies, active_site_flexibility, ligand_atom_types, __kwargtrans__ ({ligand_rotatable_bonds: ligand.rotatable_bonds_count}));
......
......@@ -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-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:33
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';
......
// Transcrypt'ed from Python, 2021-11-05 16:24:08
// Transcrypt'ed from Python, 2021-11-09 00:25:32
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, 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__ = 'math';
export var pi = Math.PI;
......
// Transcrypt'ed from Python, 2021-11-05 16:24:08
// Transcrypt'ed from Python, 2021-11-09 00:25:32
var __name__ = 'org.transcrypt.__runtime__';
export var __envir__ = {};
__envir__.interpreter_name = 'python';
......
// Transcrypt'ed from Python, 2021-11-05 16:24:09
// Transcrypt'ed from Python, 2021-11-09 00:25:34
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 {translate} from './re.translate.js';
export {translate};
......
// Transcrypt'ed from Python, 2021-11-05 16:24:10
// Transcrypt'ed from Python, 2021-11-09 00:25:34
var re = {};
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_re__ from './re.js';
......
......@@ -4,9 +4,25 @@
# this file contains the Atom class for binana.py
import math
import binana
from binana._structure.point import Point
from binana._utils.shim import r_just, round_to_thousandths_to_str
from binana._utils._math_functions import angle_between_three_points
# __pragma__ ('skip')
# Python
from math import fabs
# __pragma__ ('noskip')
"""?
# Transcrypt
import binana._utils
from binana._utils import shim
from binana._utils.shim import fabs
?"""
"""
Class Atom defines an atom
......@@ -81,10 +97,10 @@ class Atom:
+ r_just(self.residue, 4)
)
output = output + r_just(round_to_thousandths_to_str(self.coordinates.x), 18)
output = output + r_just(round_to_thousandths_to_str(self.coordinates.y), 8)
output = output + r_just(round_to_thousandths_to_str(self.coordinates.z), 8)
output = output + r_just(self.element, 24)
output += r_just(round_to_thousandths_to_str(self.coordinates.x), 18)
output += r_just(round_to_thousandths_to_str(self.coordinates.y), 8)
output += r_just(round_to_thousandths_to_str(self.coordinates.z), 8)
output += r_just(self.element, 24)
return output
# Returns the number of an atom's nearest neighbors
......@@ -96,19 +112,14 @@ class Atom:
# Param self (Atom)
# Param index (float): index of atom to be added
def add_neighbor_atom_index(self, index):
if not (index in self.indecies_of_atoms_connecting):
if index not in self.indecies_of_atoms_connecting:
self.indecies_of_atoms_connecting.append(index)
# Returns whether the atom is part of the backbone or a sidechain
# Only really applies to proteins, assuming standard atom names
# Param self (Atom)
def side_chain_or_backbone(self):
if (
self.atom_name.strip() == "CA"
or self.atom_name.strip() == "C"
or self.atom_name.strip() == "O"
or self.atom_name.strip() == "N"
):
if self.atom_name.strip() in ["CA", "C", "O", "N"]:
return "BACKBONE"
else:
return "SIDECHAIN"
......@@ -205,3 +216,25 @@ class Atom:
if self.residue.strip() == "":
self.residue = " MOL"
# TODO: Might make more sense to put this in mol.
def has_sp3_geometry(self, parent_mol):
ncrs = [
parent_mol.all_atoms[i].coordinates
for i in self.indecies_of_atoms_connecting
]
ccr = self.coordinates
to_deg = 180.0 / math.pi
angles = [angle_between_three_points(ncrs[0], ccr, ncrs[1]) * to_deg]
if len(ncrs) > 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:
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)
average_angle = sum(angles) / float(len(angles))
return fabs(average_angle - 109.0) < 5.0
This diff is collapsed.
......@@ -11,14 +11,14 @@ REMARK electrostatic_dist_cutoff | 4.0
REMARK hydrogen_halogen_bond_angle_cutoff | 40.0
REMARK hydrogen_halogen_bond_dist_cutoff | 4.0
REMARK hydrophobic_dist_cutoff | 4.0
REMARK ligand | /Users/jdurrant/Documents/Work/durrant_git/binana/binana/test/input/ligand.pdbqt
REMARK output_dir | /Users/jdurrant/Documents/Work/durrant_git/binana/binana/test/output/
REMARK output_file | /Users/jdurrant/Documents/Work/durrant_git/binana/binana/test/output/output.pdb
REMARK output_json | /Users/jdurrant/Documents/Work/durrant_git/binana/binana/test/output/output.json
REMARK ligand | /Users/jdurrant/Documents/Work/durrant_git/binana/python/binana/_test/input/ligand.pdbqt
REMARK output_dir | /Users/jdurrant/Documents/Work/durrant_git/binana/python/binana/_test/output/
REMARK output_file | /Users/jdurrant/Documents/Work/durrant_git/binana/python/binana/_test/output/output.pdb
REMARK output_json | /Users/jdurrant/Documents/Work/durrant_git/binana/python/binana/_test/output/output.json
REMARK pi_padding_dist | 0.75
REMARK pi_pi_interacting_dist_cutoff | 7.5
REMARK pi_stacking_angle_tolerance | 30.0
REMARK receptor | /Users/jdurrant/Documents/Work/durrant_git/binana/binana/test/input/receptor.pdbqt
REMARK receptor | /Users/jdurrant/Documents/Work/durrant_git/binana/python/binana/_test/input/receptor.pdbqt
REMARK salt_bridge_dist_cutoff | 5.5
REMARK test | False
REMARK
......@@ -8328,11 +8328,11 @@ REMARK "OTH" indicate receptor contacts whose respective protein residues have
REMARK the alpha-helix, beta-sheet, or "other" secondary structure. "BAC" and
REMARK "SID" indicate receptor contacts that are part of the protein backbone
REMARK and sidechain, respectively. "HYD" indicates hydrophobic contacts
REMARK between the protein and ligand. "HBN" indicates hydrogen bonds. "SAL"
REMARK indicates salt bridges. "PIS" indicates pi-pi stacking interactions,
REMARK "PIT" indicates T-stacking interactions, and "PIC" indicates cation-pi
REMARK interactions. Protein residue names are unchanged, but the ligand
REMARK residue is now named "LIG".
REMARK between the protein and ligand. "HBN" indicates hydrogen bonds. "HAL"
REMARK indicates halogen bonds. "SAL" indicates salt bridges. "PIS" indicates
REMARK pi-pi stacking interactions, "PIT" indicates T-stacking interactions,
REMARK and "PIC" indicates cation-pi interactions. Protein residue names are
REMARK unchanged, but the ligand residue is now named "LIG".
REMARK
ATOM 1 N ASP 23.366 -3.399 14.662 N
ATOM 2 CA ASP 22.530 -2.226 14.843 C
......
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