Commit d9ef5b38 authored by jdurrant's avatar jdurrant
Browse files

Metal coordination, etc.

parent 01bca4b2
......@@ -23,41 +23,39 @@ WIP
13. Improved ability to detect salt bridges and hydrogen bonds even if protein
and ligand models do not have hydrogen atoms.
14. Speed improvements
15. Revised file input system. Can now also specify PDB ID, extract delete
non-protein residues, etc.
16. Sulfur can now be a hydrogen bond donor and acceptor.
TODO:
Halogen bonds mention in all documentation?
Consider "S" as donor/acceptors? Need to investigate.
Test should also test version of protein without hydrogens, and make sure you
get all interactions tested. Metal, halogen, hydrogen with S.
Test should also test version of protein without hydrogens
If you add in new receptor or ligand, be sure to reevaluate whether new hydrogen
warning should appear.
If you add in new receptor or ligand, be sure to reevaluate whether warning
should appear.
METAL_COORDINATION_CUTOFF. Get into web app, documentation, parameters, etc.
# Metal Bonds
Make sure all documentation/examples account for get_all_interactions (updated for metal coordination, halogen 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
finish README.md on file loading component.
These can form metal bonds:
N
O
Cl
F
Br
I
Check all docstrings on functions.
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.
PDBQT in webapp looks strange?
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).
SDF on ligand works?
METAL_COORDINATION_CUTOFF. Get into web app, documentation, parameters, etc.
Makesure can loadin multipleligands. Probably need to rewritecodethat triggersbinana run. Also, can run if restart.
Report actualdistanbes and anglesin json?
Convert Json to CSV?
Make sure all documentation/examples account for get_all_interactions (updated for metal coordination)
Notvisualizing metalcoord bonds. 2M30
2.0
---
......
// Transcrypt'ed from Python, 2021-11-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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,12 +2,12 @@
// 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-12 01:16:44
// Transcrypt'ed from Python, 2021-11-19 00:20:07
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';
__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, LIGAND, OUTPUT_DIR, OUTPUT_FILE, OUTPUT_JSON, PI_PADDING_DIST, PI_PI_INTERACTING_DIST_CUTOFF, PI_STACKING_ANGLE_TOLERANCE, RECEPTOR, SALT_BRIDGE_DIST_CUTOFF, TEST, T_STACKING_ANGLE_TOLERANCE, T_STACKING_CLOSEST_DIST_CUTOFF} from './binana.interactions.default_params.js';
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, LIGAND, METAL_COORDINATION_CUTOFF, OUTPUT_DIR, OUTPUT_FILE, OUTPUT_JSON, PI_PADDING_DIST, PI_PI_INTERACTING_DIST_CUTOFF, PI_STACKING_ANGLE_TOLERANCE, RECEPTOR, SALT_BRIDGE_DIST_CUTOFF, TEST, T_STACKING_ANGLE_TOLERANCE, T_STACKING_CLOSEST_DIST_CUTOFF} from './binana.interactions.default_params.js';
var __name__ = 'binana._cli_params._get_params';
export var sep = '/';
export var CommandLineParameters = __class__ ('CommandLineParameters', [object], {
......@@ -15,8 +15,7 @@ export var CommandLineParameters = __class__ ('CommandLineParameters', [object]
params: dict ({}),
get is_num () {return __get__ (this, function (self, num) {
try {
var t = float (num);
return t;
return float (num);
}
catch (__except0__) {
if (isinstance (__except0__, ValueError)) {
......@@ -42,6 +41,7 @@ export var CommandLineParameters = __class__ ('CommandLineParameters', [object]
self.params ['T_stacking_closest_dist_cutoff'] = T_STACKING_CLOSEST_DIST_CUTOFF;
self.params ['cation_pi_dist_cutoff'] = CATION_PI_DIST_CUTOFF;
self.params ['salt_bridge_dist_cutoff'] = SALT_BRIDGE_DIST_CUTOFF;
self.params ['metal_coordination_dist_cutoff'] = METAL_COORDINATION_CUTOFF;
self.params ['receptor'] = RECEPTOR;
self.params ['ligand'] = LIGAND;
self.params ['output_dir'] = OUTPUT_DIR;
......@@ -78,12 +78,7 @@ export var CommandLineParameters = __class__ ('CommandLineParameters', [object]
}
});},
get okay_to_proceed () {return __get__ (this, function (self) {
if (self.params ['receptor'] != '' && self.params ['ligand'] != '') {
return true;
}
else {
return false;
}
return self.params ['receptor'] != '' && self.params ['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-12 01:16:44
// Transcrypt'ed from Python, 2021-11-19 00:20:08
var __future__ = {};
var binana = {};
var math = {};
......@@ -26,11 +26,11 @@ export var _get_all_interactions = function (parameters) {
var ligand = __left0__ [0];
var receptor = __left0__ [1];
var pi_padding = parameters.params ['pi_padding_dist'];
var all_interacts = get_all_interactions (ligand, receptor, parameters.params ['close_contacts_dist1_cutoff'], parameters.params ['close_contacts_dist2_cutoff'], parameters.params ['electrostatic_dist_cutoff'], parameters.params ['active_site_flexibility_dist_cutoff'], parameters.params ['hydrophobic_dist_cutoff'], parameters.params ['hydrogen_halogen_bond_dist_cutoff'], parameters.params ['hydrogen_halogen_bond_angle_cutoff'], parameters.params ['pi_pi_interacting_dist_cutoff'], parameters.params ['pi_stacking_angle_tolerance'], parameters.params ['T_stacking_angle_tolerance'], parameters.params ['T_stacking_closest_dist_cutoff'], parameters.params ['cation_pi_dist_cutoff'], parameters.params ['salt_bridge_dist_cutoff'], pi_padding);
var all_interacts = get_all_interactions (ligand, receptor, parameters.params ['close_contacts_dist1_cutoff'], parameters.params ['close_contacts_dist2_cutoff'], parameters.params ['electrostatic_dist_cutoff'], parameters.params ['active_site_flexibility_dist_cutoff'], parameters.params ['hydrophobic_dist_cutoff'], parameters.params ['hydrogen_halogen_bond_dist_cutoff'], parameters.params ['hydrogen_halogen_bond_angle_cutoff'], parameters.params ['pi_pi_interacting_dist_cutoff'], parameters.params ['pi_stacking_angle_tolerance'], parameters.params ['T_stacking_angle_tolerance'], parameters.params ['T_stacking_closest_dist_cutoff'], parameters.params ['cation_pi_dist_cutoff'], parameters.params ['salt_bridge_dist_cutoff'], parameters.params ['metal_coordination_dist_cutoff'], pi_padding);
for (var key of all_interacts ['cat_pi'] ['counts'].py_keys ()) {
all_interacts ['pi_pi'] ['counts'] [key] = all_interacts ['cat_pi'] ['counts'] [key];
}
_write_main (parameters, ligand, receptor, all_interacts ['closest'], all_interacts ['close'], all_interacts ['hydrophobics'], all_interacts ['hydrogen_bonds'], all_interacts ['halogen_bonds'], all_interacts ['salt_bridges'], all_interacts ['pi_pi'], all_interacts ['cat_pi'], all_interacts ['electrostatic_energies'], all_interacts ['active_site_flexibility'], all_interacts ['ligand_atom_types']);
_write_main (parameters, ligand, receptor, all_interacts ['closest'], all_interacts ['close'], all_interacts ['hydrophobics'], all_interacts ['hydrogen_bonds'], all_interacts ['halogen_bonds'], all_interacts ['salt_bridges'], all_interacts ['metal_coordinations'], all_interacts ['pi_pi'], all_interacts ['cat_pi'], all_interacts ['electrostatic_energies'], all_interacts ['active_site_flexibility'], all_interacts ['ligand_atom_types']);
};
export var _intro = function () {
var version = '2.0';
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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';
......@@ -10,6 +10,7 @@ import {fabs} from './binana._utils.shim.js';
import * as shim from './binana._utils.shim.js';
import * as __module_binana__utils__ from './binana._utils.js';
__nest__ (binana, '_utils', __module_binana__utils__);
import {protein_resnames, to_deg, two_leter_atom_names} from './binana._structure.consts.js';
import {angle_between_three_points} from './binana._utils._math_functions.js';
import {r_just, round_to_thousandths_to_str} from './binana._utils.shim.js';
import {Point} from './binana._structure.point.js';
......@@ -18,7 +19,6 @@ __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) {
......@@ -92,54 +92,18 @@ export var Atom = __class__ ('Atom', [object], {
if (len (self.atom_name) == 1) {
self.atom_name = self.atom_name + ' ';
}
else if (len (self.atom_name) == 2) {
self.atom_name = self.atom_name + ' ';
}
else if (len (self.atom_name) == 3) {
else if (__in__ (len (self.atom_name), [2, 3])) {
self.atom_name = self.atom_name + ' ';
}
self.coordinates = Point (float (line.__getslice__ (30, 38, 1)), float (line.__getslice__ (38, 46, 1)), float (line.__getslice__ (46, 54, 1)));
self.atom_type = line.__getslice__ (77, 79, 1).strip ().upper ();
if (line.__getslice__ (69, 76, 1).strip () != '') {
self.charge = float (line.__getslice__ (69, 76, 1));
}
else {
self.charge = 0.0;
}
self.atom_type = line.__getslice__ (76, 79, 1).strip ().upper ();
self.charge = (line.__getslice__ (69, 76, 1).strip () != '' ? float (line.__getslice__ (69, 76, 1)) : 0.0);
self.residue = line.__getslice__ (16, 20, 1);
self.residue = ' ' + self.residue.__getslice__ (-(3), null, 1);
if (self.element == '') {
var two_letters = self.atom_name.__getslice__ (0, 2, 1).strip ().upper ();
if (two_letters == 'BR') {
self.element = 'BR';
}
else if (two_letters == 'CL') {
self.element = 'CL';
}
else if (two_letters == 'BI') {
self.element = 'BI';
}
else if (two_letters == 'AS') {
self.element = 'AS';
}
else if (two_letters == 'AG') {
self.element = 'AG';
}
else if (two_letters == 'LI') {
self.element = 'LI';
}
else if (two_letters == 'MG') {
self.element = 'MG';
}
else if (two_letters == 'MN') {
self.element = 'MN';
}
else if (two_letters == 'RH') {
self.element = 'RH';
}
else if (two_letters == 'ZN') {
self.element = 'ZN';
}
else if (two_letters == 'FE') {
self.element = 'FE';
if (__in__ (two_letters, two_leter_atom_names) && !__in__ (self.residue.__getslice__ (-(3), null, 1), protein_resnames)) {
self.element = two_letters;
}
else {
self.element = self.atom_name;
......@@ -158,8 +122,6 @@ export var Atom = __class__ ('Atom', [object], {
}
}
self.pdb_index = line.__getslice__ (6, 12, 1).strip ();
self.residue = line.__getslice__ (16, 20, 1);
self.residue = ' ' + self.residue.__getslice__ (-(3), null, 1);
try {
self.resid = int (line.__getslice__ (23, 26, 1));
}
......
// This file is part of BINANA, released under the Apache 2.0 License. See
// 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-19 00:20:08
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';
import * as __module_math__ from './math.js';
__nest__ (math, '', __module_math__);
var __name__ = 'binana._structure.consts';
export var _max_donor_X_dist = dict ({'H': 1.3, 'I': 2.04 * 1.4, 'BR': 1.86 * 1.4, 'Br': 1.86 * 1.4, 'CL': 1.71 * 1.4, 'Cl': 1.71 * 1.4, 'F': 1.33 * 1.4});
export var _alternate_protein_resname = dict ({'LYS': ['LYS', 'LYN'], 'HIS': ['HIS', 'HID', 'HIE', 'HIP'], 'GLU': ['GLU', 'GLH', 'GLX'], 'ASP': ['ASP', 'ASH', 'ASX']});
export var _protein_hydro_bond_donors = [[['ARG'], ['NE', 'NH1', 'NH2']], [_alternate_protein_resname ['HIS'], ['NE2', 'ND1']], [_alternate_protein_resname ['LYS'], ['NZ']], [['SER'], ['OG']], [['THR'], ['OG1']], [['ASN'], ['ND2']], [['GLN'], ['NE2']], [['TYR'], ['OH']], [['TRP'], ['NE1']], [['CYS'], ['SG']]];
export var protein_resnames = ['ALA', 'ARG', 'ASN', 'ASP', 'ASH', 'ASX', 'CYS', 'CYM', 'CYX', 'GLN', 'GLU', 'GLH', 'GLX', 'GLY', 'HIS', 'HID', 'HIE', 'HIP', 'ILE', 'LEU', 'LYS', 'LYN', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL'];
export var _required_protein_atom_names = [[_alternate_protein_resname ['GLU'], ['OE1', 'OE2']], [_alternate_protein_resname ['ASP'], ['OD1', 'OD2']], [['ARG'], ['NH1', 'NH2', 'NE']], [_alternate_protein_resname ['HIS'], ['NE2', 'ND1']], [['PHE'], ['CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ']], [['TYR'], ['CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ', 'OH']], [['TRP'], ['CG', 'CD1', 'CD2', 'NE1', 'CE2', 'CE3', 'CZ2', 'CZ3', 'CH2']], [_alternate_protein_resname ['HIS'], ['CG', 'ND1', 'CD2', 'CE1', 'NE2']], [_alternate_protein_resname ['LYS'], ['NZ']]];
export var to_deg = 180.0 / math.pi;
export var two_leter_atom_names = ['AC', 'AG', 'AL', 'AM', 'AU', 'BA', 'BE', 'BK', 'CA', 'CD', 'CE', 'CF', 'CM', 'CO', 'CR', 'CS', 'CU', 'DB', 'DY', 'ER', 'ES', 'EU', 'FE', 'FM', 'FR', 'GA', 'GD', 'GE', 'HF', 'HG', 'HO', 'IN', 'IR', 'LA', 'LR', 'LU', 'MD', 'MG', 'MN', 'MO', 'NB', 'ND', 'NI', 'NO', 'NP', 'OS', 'PA', 'PB', 'PD', 'PM', 'PO', 'PR', 'PT', 'PU', 'RA', 'RE', 'RF', 'RH', 'RU', 'SB', 'SC', 'SG', 'SM', 'SN', 'SR', 'TA', 'TB', 'TC', 'TH', 'TI', 'TL', 'TM', 'YB', 'ZN', 'ZR', 'BR', 'CL', 'BI', 'AS', 'LI'];
//# sourceMappingURL=binana._structure.consts.map
\ No newline at end of file
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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';
......@@ -11,6 +11,7 @@ import {fabs} from './binana._utils.shim.js';
import * as shim from './binana._utils.shim.js';
import * as __module_binana__utils__ from './binana._utils.js';
__nest__ (binana, '_utils', __module_binana__utils__);
import {_alternate_protein_resname, _max_donor_X_dist, _protein_hydro_bond_donors, _required_protein_atom_names, protein_resnames} from './binana._structure.consts.js';
import {_set_default} from './binana._utils.shim.js';
import {cross_product, dihedral, distance, vector_subtraction} from './binana._utils._math_functions.js';
import {Atom} from './binana._structure.atom.js';
......@@ -21,11 +22,6 @@ import * as __module_binana__ from './binana.js';
__nest__ (binana, '', __module_binana__);
var __name__ = 'binana._structure.mol';
export var textwrap = shim;
export var _max_donor_X_dist = dict ({'H': 1.3, 'I': 2.04 * 1.4, 'BR': 1.86 * 1.4, 'Br': 1.86 * 1.4, 'CL': 1.71 * 1.4, 'Cl': 1.71 * 1.4, 'F': 1.33 * 1.4});
export var _alternate_protein_resname = dict ({'LYS': ['LYS', 'LYN'], 'HIS': ['HIS', 'HID', 'HIE', 'HIP'], 'GLU': ['GLU', 'GLH', 'GLX'], 'ASP': ['ASP', 'ASH', 'ASX']});
export var _protein_hydro_bond_donors = [[['ARG'], ['NE', 'NH1', 'NH2']], [_alternate_protein_resname ['HIS'], ['NE2', 'ND1']], [_alternate_protein_resname ['LYS'], ['NZ']], [['SER'], ['OG']], [['THR'], ['OG1']], [['ASN'], ['ND2']], [['GLN'], ['NE2']], [['TYR'], ['OH']], [['TRP'], ['NE1']]];
export var protein_resnames = ['ALA', 'ARG', 'ASN', 'ASP', 'ASH', 'ASX', 'CYS', 'CYM', 'CYX', 'GLN', 'GLU', 'GLH', 'GLX', 'GLY', 'HIS', 'HID', 'HIE', 'HIP', 'ILE', 'LEU', 'LYS', 'LYN', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL'];
export var _required_protein_atom_names = [[_alternate_protein_resname ['GLU'], ['OE1', 'OE2']], [_alternate_protein_resname ['ASP'], ['OD1', 'OD2']], [['ARG'], ['NH1', 'NH2', 'NE']], [_alternate_protein_resname ['HIS'], ['NE2', 'ND1']], [['PHE'], ['CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ']], [['TYR'], ['CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ', 'OH']], [['TRP'], ['CG', 'CD1', 'CD2', 'NE1', 'CE2', 'CE3', 'CZ2', 'CZ3', 'CH2']], [_alternate_protein_resname ['HIS'], ['CG', 'ND1', 'CD2', 'CE1', 'NE2']], [_alternate_protein_resname ['LYS'], ['NZ']]];
export var Mol = __class__ ('Mol', [object], {
__module__: __name__,
get __init__ () {return __get__ (this, function (self) {
......@@ -416,7 +412,7 @@ export var Mol = __class__ ('Mol', [object], {
});},
get _categorize_hydro_bond_donor_accep_no_hydros () {return __get__ (this, function (self, atom) {
var charaterizations = [];
if (__in__ (atom.element, ['O', 'N'])) {
if (__in__ (atom.element, ['O', 'N', 'S'])) {
charaterizations.append (['ACCEPTOR', null]);
}
var is_protein_hbond_donor = self._is_hbond_donor_per_protein (atom);
......@@ -427,7 +423,7 @@ export var Mol = __class__ ('Mol', [object], {
return charaterizations;
}
var num_neighbors = atom.number_of_neighbors ();
if (atom.element == 'O' && num_neighbors == 1) {
if (__in__ (atom.element, ['O', 'S']) && num_neighbors == 1) {
var neighbor_idx = atom.indecies_of_atoms_connecting [0];
var neighbor = self.all_atoms [neighbor_idx];
var neighbor_is_sp3 = neighbor.has_sp3_geometry (self);
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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-12 01:16:44
// Transcrypt'ed from Python, 2021-11-19 00:20:08
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 ({});
......@@ -56,8 +56,8 @@ export var _set_default = function (val, py_default) {
export var round_to_thousandths_to_str = function (val) {
var val = round (val, 3);
var val_str = str (val);
if (!(__in__ ('.', val_str))) {
var val_str = val_str + '.0';
if (!__in__ ('.', val_str)) {
val_str += '.0';
}
var prts = val_str.py_split ('.');
prts [1] = prts [1].__getslice__ (0, 3, 1);
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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';
......@@ -11,12 +11,7 @@ export var hashtable_entry_add_one = function (hashtable, key, toadd) {
var toadd = null;
};
var toadd = _set_default (toadd, 1);
if (__in__ (key, hashtable)) {
hashtable [key] = hashtable [key] + toadd;
}
else {
hashtable [key] = toadd;
}
hashtable [key] = (__in__ (key, hashtable) ? hashtable [key] + toadd : toadd);
};
export var list_alphebetize_and_combine = function (list_obj) {
list_obj.py_sort ();
......
......@@ -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-12 01:16:46
// Transcrypt'ed from Python, 2021-11-19 00:20:10
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, _utils, OpenFile};
export {_utils, OpenFile, shim};
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-12 01:16:46
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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';
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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';
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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';
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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';
......
......@@ -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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
var __future__ = {};
var binana = {};
var math = {};
......@@ -22,13 +22,11 @@ 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, dist_cutoff);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, dist_cutoff, ['O', 'N', 'S']);
return (function () {
var __accu0__ = [];
for (var [ligand_atom, receptor_atom, dist] of ligand_receptor_dists) {
if (__in__ (ligand_atom.element, ['O', 'N']) && __in__ (receptor_atom.element, ['O', 'N'])) {
__accu0__.append ([ligand_atom, receptor_atom]);
}
__accu0__.append ([ligand_atom, receptor_atom]);
}
return __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-12 01:16:45
// Transcrypt'ed from Python, 2021-11-19 00:20:09
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_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, cutoff);
var ligand_receptor_dists = _get_ligand_receptor_dists (ligand, receptor, cutoff, ['C']);