Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jdurrant
binana
Commits
063873b2
Commit
063873b2
authored
Nov 09, 2021
by
jdurrant
Browse files
Before removing cruft from old hydrogen/halogen-bond code.
parent
6c2f57df
Changes
82
Expand all
Show whitespace changes
Inline
Side-by-side
CHANGES.md
View file @
063873b2
...
...
@@ -17,10 +17,25 @@ WIP
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 even if protein and ligand models do not have hydrogen atoms. TODO: Try to detect hydrogen bonds too.
TODO:
Halogen bonds mention in all documentation?
Halogen bonds counted twice? Good to check. In the chart in log file.
CAPTURE WARNINGS. Also, move no-hydrogen warning to below table to be less
obtrusive.
Consider "S" as donor/acceptors? Need to investigate.
Much of hydrogen-bond detecting code should go into mol. Also, use protein
definitions where possible, like you do for electrostatics. But in case of
hydrogen bonds detecvt only on the ffly (otherwise too many).
Test should also test version of protein without hydrogens
2.
0
---
...
...
javascript/lib/__future__.js
View file @
063873b2
// Transcrypt'ed from Python, 2021-11-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 00:25:33
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
=
[];
...
...
javascript/lib/binana._cli_params._get_params.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:08
// Transcrypt'ed from Python, 2021-11-0
9 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
__module_binana__
from
'
./binana.js
'
;
...
...
javascript/lib/binana._start.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:08
// Transcrypt'ed from Python, 2021-11-0
9 00:25:32
var
__future__
=
{};
var
binana
=
{};
var
math
=
{};
...
...
javascript/lib/binana._structure.atom.js
View file @
063873b2
...
...
@@ -2,13 +2,21 @@
// 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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 00:25:33
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
'
;
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
{
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
'
;
import
*
as
__module_binana__
from
'
./binana.js
'
;
__nest__
(
binana
,
''
,
__module_binana__
);
import
*
as
__module_math__
from
'
./math.js
'
;
__nest__
(
math
,
''
,
__module_math__
);
var
__name__
=
'
binana._structure.atom
'
;
export
var
Atom
=
__class__
(
'
Atom
'
,
[
object
],
{
__module__
:
__name__
,
...
...
@@ -55,22 +63,22 @@ export var Atom = __class__ ('Atom', [object], {
get
create_pdb_line
()
{
return
__get__
(
this
,
function
(
self
,
index
)
{
var
output
=
'
ATOM
'
;
var
output
=
((
output
+
r_just
(
str
(
index
),
6
))
+
r_just
(
self
.
atom_name
,
5
))
+
r_just
(
self
.
residue
,
4
);
var
output
=
output
+
r_just
(
round_to_thousandths_to_str
(
self
.
coordinates
.
x
),
18
);
var
output
=
output
+
r_just
(
round_to_thousandths_to_str
(
self
.
coordinates
.
y
),
8
);
var
output
=
output
+
r_just
(
round_to_thousandths_to_str
(
self
.
coordinates
.
z
),
8
);
var
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
;
});},
get
number_of_neighbors
()
{
return
__get__
(
this
,
function
(
self
)
{
return
len
(
self
.
indecies_of_atoms_connecting
);
});},
get
add_neighbor_atom_index
()
{
return
__get__
(
this
,
function
(
self
,
index
)
{
if
(
!
(
__in__
(
index
,
self
.
indecies_of_atoms_connecting
))
)
{
if
(
!
__in__
(
index
,
self
.
indecies_of_atoms_connecting
))
{
self
.
indecies_of_atoms_connecting
.
append
(
index
);
}
});},
get
side_chain_or_backbone
()
{
return
__get__
(
this
,
function
(
self
)
{
if
(
self
.
atom_name
.
strip
()
==
'
CA
'
||
self
.
atom_name
.
strip
()
==
'
C
'
||
self
.
atom_name
.
strip
()
==
'
O
'
||
self
.
atom_name
.
strip
()
==
'
N
'
)
{
if
(
__in__
(
self
.
atom_name
.
strip
(),
[
'
CA
'
,
'
C
'
,
'
O
'
,
'
N
'
])
)
{
return
'
BACKBONE
'
;
}
else
{
...
...
@@ -164,6 +172,29 @@ export var Atom = __class__ ('Atom', [object], {
if
(
self
.
residue
.
strip
()
==
''
)
{
self
.
residue
=
'
MOL
'
;
}
});},
get
has_sp3_geometry
()
{
return
__get__
(
this
,
function
(
self
,
parent_mol
)
{
var
ncrs
=
(
function
()
{
var
__accu0__
=
[];
for
(
var
i
of
self
.
indecies_of_atoms_connecting
)
{
__accu0__
.
append
(
parent_mol
.
all_atoms
[
i
].
coordinates
);
}
return
__accu0__
;
})
();
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
)
{
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
);
}
var
average_angle
=
sum
(
angles
)
/
float
(
len
(
angles
));
return
fabs
(
average_angle
-
109.0
)
<
5.0
;
});}
});
...
...
javascript/lib/binana._structure.mol.js
View file @
063873b2
This diff is collapsed.
Click to expand it.
javascript/lib/binana._structure.point.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:08
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
javascript/lib/binana._utils._math_functions.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:08
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
@@ -84,8 +84,7 @@ export var dihedral = function (point1, point2, point3, point4) {
var
b2Xb3
=
cross_product
(
b2
,
b3
);
var
b1Xb2
=
cross_product
(
b1
,
b2
);
var
b1XMagb2
=
vector_scalar_multiply
(
b1
,
b2
.
magnitude
());
var
radians
=
math
.
atan2
(
dot_product
(
b1XMagb2
,
b2Xb3
),
dot_product
(
b1Xb2
,
b2Xb3
));
return
radians
;
return
math
.
atan2
(
dot_product
(
b1XMagb2
,
b2Xb3
),
dot_product
(
b1Xb2
,
b2Xb3
));
};
export
var
angle_between_three_points
=
function
(
point1
,
point2
,
point3
)
{
var
vector1
=
vector_subtraction
(
point1
,
point2
);
...
...
@@ -96,12 +95,8 @@ export var angle_between_points = function (point1, point2) {
var
new_point1
=
return_normalized_vector
(
point1
);
var
new_point2
=
return_normalized_vector
(
point2
);
var
dot_prod
=
dot_product
(
new_point1
,
new_point2
);
if
(
dot_prod
>
1.0
)
{
var
dot_prod
=
1.0
;
}
if
(
dot_prod
<
-
(
1.0
))
{
var
dot_prod
=
-
(
1.0
);
}
var
dot_prod
=
min
(
dot_prod
,
1.0
);
var
dot_prod
=
max
(
dot_prod
,
-
(
1.0
));
return
math
.
acos
(
dot_prod
);
};
export
var
return_normalized_vector
=
function
(
vector
)
{
...
...
javascript/lib/binana._utils.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 00:25:33
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
'
;
...
...
javascript/lib/binana._utils.shim.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:08
// Transcrypt'ed from Python, 2021-11-0
9 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._utils.shim
'
;
export
var
fake_fs
=
dict
({});
...
...
javascript/lib/binana._utils.utils.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 00:25:33
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
'
;
...
...
javascript/lib/binana.fs.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:10
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
@@ -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
{
OpenFile
,
_utils
,
shim
};
export
{
_utils
,
shim
,
OpenFile
};
var
__name__
=
'
binana.fs
'
;
export
var
save_file
=
function
(
filename
,
text
)
{
var
f
=
OpenFile
(
filename
,
'
w
'
);
...
...
javascript/lib/binana.interactions._cat_pi.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
{
project_point_onto_plane
}
from
'
./binana._utils._math_functions.js
'
;
...
...
@@ -40,14 +40,14 @@ export var _detect_pi_cat = function (mol_with_aromatic, mol_with_pos_charge, cu
for
(
var
index
of
charged
.
indices
)
{
__accu0__
.
append
(
mol_with_pos_charge
.
all_atoms
[
index
].
string_id
());
}
return
__accu0__
;
return
py_iter
(
__accu0__
)
;
})
()))
+
'
]
'
;
var
aromatic_mol_lbls
=
(
'
[
'
+
'
/
'
.
join
((
function
()
{
var
__accu0__
=
[];
for
(
var
index
of
aromatic
.
indices
)
{
__accu0__
.
append
(
mol_with_aromatic
.
all_atoms
[
index
].
string_id
());
}
return
__accu0__
;
return
py_iter
(
__accu0__
)
;
})
()))
+
'
]
'
;
if
(
name_of_charged
==
'
LIGAND
'
)
{
cat_pi_labels
.
append
(
tuple
([
charged_mol_lbls
,
aromatic_mol_lbls
]));
...
...
javascript/lib/binana.interactions._close.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
javascript/lib/binana.interactions._closest.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
javascript/lib/binana.interactions._electrostatic_energies.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
{
hashtable_entry_add_one
,
list_alphebetize_and_combine
}
from
'
./binana._utils.utils.js
'
;
...
...
javascript/lib/binana.interactions._flexibility.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
javascript/lib/binana.interactions._hydrogen_halogen_bonds.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 00:25:33
var
__future__
=
{};
var
binana
=
{};
var
math
=
{};
...
...
@@ -21,7 +21,20 @@ __nest__ (binana, '', __module_binana__);
import
{
HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF
,
HYDROGEN_HALOGEN_BOND_DIST_CUTOFF
}
from
'
./binana.interactions.default_params.js
'
;
import
{
_set_default
}
from
'
./binana._utils.shim.js
'
;
var
__name__
=
'
binana.interactions._hydrogen_halogen_bonds
'
;
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
_mimic_set_minus
=
function
(
set1
,
set2
)
{
for
(
var
s2
of
set2
)
{
var
set1
=
(
function
()
{
var
__accu0__
=
[];
for
(
var
s
of
set1
)
{
if
(
s
[
0
]
!=
s2
[
0
])
{
__accu0__
.
append
(
s
);
}
}
return
__accu0__
;
})
();
}
return
set1
;
};
export
var
get_hydrogen_or_halogen_bonds
=
function
(
ligand
,
receptor
,
dist_cutoff
,
angle_cutoff
,
hydrogen_bond
)
{
if
(
typeof
dist_cutoff
==
'
undefined
'
||
(
dist_cutoff
!=
null
&&
dist_cutoff
.
hasOwnProperty
(
"
__kwargtrans__
"
)))
{;
var
dist_cutoff
=
null
;
...
...
@@ -32,45 +45,56 @@ export var get_hydrogen_or_halogen_bonds = function (ligand, receptor, dist_cuto
if
(
typeof
hydrogen_bond
==
'
undefined
'
||
(
hydrogen_bond
!=
null
&&
hydrogen_bond
.
hasOwnProperty
(
"
__kwargtrans__
"
)))
{;
var
hydrogen_bond
=
true
;
};
var
central_atoms
=
(
hydrogen_bond
?
[
'
H
'
]
:
[
'
I
'
,
'
BR
'
,
'
Br
'
,
'
CL
'
,
'
Cl
'
,
'
F
'
]);
var
dist_cutoff
=
_set_default
(
dist_cutoff
,
HYDROGEN_HALOGEN_BOND_DIST_CUTOFF
);
var
angle_cutoff
=
_set_default
(
angle_cutoff
,
HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF
);
var
hbonds
=
dict
({});
var
pdb_hbonds
=
Mol
();
var
hbonds_labels
=
[];
var
dist_cutoff
=
_set_default
(
dist_cutoff
,
HYDROGEN_HALOGEN_BOND_DIST_CUTOFF
);
var
angle_cutoff
=
_set_default
(
angle_cutoff
,
HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF
);
var
lig_and_recep_have_hydrogens
=
ligand
.
has_hydrogens
&&
receptor
.
has_hydrogens
;
var
ligand_receptor_dists
=
_get_ligand_receptor_dists
(
ligand
,
receptor
);
var
close_donors_acceptors
=
(
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
'
]))
{
var
hydrogens
=
[];
for
(
var
atm_index
of
ligand
.
all_atoms
.
py_keys
())
{
var
element
=
ligand
.
all_atoms
[
atm_index
].
element
;
if
(
__in__
(
element
,
central_atoms
))
{
var
dist
=
ligand
.
all_atoms
[
atm_index
].
coordinates
.
dist_to
(
ligand_atom
.
coordinates
);
if
(
dist
<
max_donor_X_dist
[
element
])
{
ligand
.
all_atoms
[
atm_index
].
comment
=
'
LIGAND
'
;
hydrogens
.
append
(
ligand
.
all_atoms
[
atm_index
]);
__accu0__
.
append
([
ligand_atom
,
receptor_atom
]);
}
}
return
__accu0__
;
})
();
for
(
var
[
ligand_atom
,
receptor_atom
]
of
close_donors_acceptors
)
{
var
hbond_detected
=
false
;
var
lig_atm_hbond_infs
=
ligand
.
is_hbond_donor_acceptor
(
ligand_atom
,
hydrogen_bond
);
var
recep_atm_hbond_infs
=
receptor
.
is_hbond_donor_acceptor
(
receptor_atom
,
hydrogen_bond
);
for
(
var
lig_atm_hbond_inf
of
lig_atm_hbond_infs
)
{
if
(
hbond_detected
)
{
break
;
}
for
(
var
atm_index
of
receptor
.
all_atoms
.
py_keys
())
{
var
element
=
receptor
.
all_atoms
[
atm_index
].
element
;
if
(
__in__
(
element
,
central_atoms
))
{
var
dist
=
receptor
.
all_atoms
[
atm_index
].
coordinates
.
dist_to
(
receptor_atom
.
coordinates
);
if
(
dist
<
max_donor_X_dist
[
element
])
{
receptor
.
all_atoms
[
atm_index
].
comment
=
'
RECEPTOR
'
;
hydrogens
.
append
(
receptor
.
all_atoms
[
atm_index
]);
var
__left0__
=
lig_atm_hbond_inf
;
var
lig_donor_or_accept
=
__left0__
[
0
];
var
lig_center_atom
=
__left0__
[
1
];
for
(
var
recep_atm_hbond_inf
of
recep_atm_hbond_infs
)
{
var
__left0__
=
recep_atm_hbond_inf
;
var
accept_donor_or_accept
=
__left0__
[
0
];
var
accept_center_atom
=
__left0__
[
1
];
if
(
lig_donor_or_accept
==
accept_donor_or_accept
)
{
continue
;
}
var
center_atom
=
(
lig_donor_or_accept
==
'
DONOR
'
?
lig_center_atom
:
accept_center_atom
);
if
(
lig_and_recep_have_hydrogens
&&
hydrogen_bond
)
{
var
angle
=
angle_between_three_points
(
ligand_atom
.
coordinates
,
center_atom
.
coordinates
,
receptor_atom
.
coordinates
);
if
(
fabs
(
180
-
(
angle
*
180.0
)
/
math
.
pi
)
>
angle_cutoff
)
{
continue
;
}
}
for
(
var
hydrogen
of
hydrogens
)
{
if
(
fabs
(
180
-
(
angle_between_three_points
(
ligand_atom
.
coordinates
,
hydrogen
.
coordinates
,
receptor_atom
.
coordinates
)
*
180.0
)
/
math
.
pi
)
<=
angle_cutoff
)
{
var
hbonds_key
=
((((
'
HDONOR_
'
+
hydrogen
.
comment
)
+
'
_
'
)
+
receptor_atom
.
side_chain_or_backbone
())
+
'
_
'
)
+
receptor_atom
.
structure
;
var
comment
=
(
lig_donor_or_accept
==
'
ACCEPTOR
'
?
'
RECEPTOR
'
:
'
LIGAND
'
);
var
hbonds_key
=
((((
'
HDONOR_
'
+
comment
)
+
'
_
'
)
+
receptor_atom
.
side_chain_or_backbone
())
+
'
_
'
)
+
receptor_atom
.
structure
;
pdb_hbonds
.
add_new_atom
(
ligand_atom
.
copy_of
());
pdb_hbonds
.
add_new_atom
(
hydrogen
.
copy_of
());
pdb_hbonds
.
add_new_atom
(
center_atom
.
copy_of
());
pdb_hbonds
.
add_new_atom
(
receptor_atom
.
copy_of
());
hashtable_entry_add_one
(
hbonds
,
hbonds_key
);
hbonds_labels
.
append
(
tuple
([
ligand_atom
.
string_id
(),
hydrogen
.
string_id
(),
receptor_atom
.
string_id
(),
hydrogen
.
comment
]));
}
hbonds_labels
.
append
(
tuple
([
ligand_atom
.
string_id
(),
center_atom
.
string_id
(),
receptor_atom
.
string_id
(),
comment
]));
var
hbond_detected
=
true
;
break
;
}
}
}
...
...
javascript/lib/binana.interactions._hydrophobics.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
'
;
...
...
javascript/lib/binana.interactions._ligand_atom_types.js
View file @
063873b2
...
...
@@ -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-0
5 16:24:09
// Transcrypt'ed from Python, 2021-11-0
9 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
{
hashtable_entry_add_one
,
list_alphebetize_and_combine
}
from
'
./binana._utils.utils.js
'
;
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment