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
db82c857
Commit
db82c857
authored
Nov 26, 2021
by
jdurrant
Browse files
Various updates.
parent
bcb91326
Changes
108
Expand all
Hide whitespace changes
Inline
Side-by-side
CHANGES.md
View file @
db82c857
...
...
@@ -14,21 +14,23 @@ WIP
7.
JSZip now dynamic import.
8.
zip download now includes vmd state directory.
9.
Vmd state file centers on ligand automatically.
10.
changed
hydrogen_bond_dist_cutoff and
hydrogen_bond_angle_cutoff parameter
names to hydrogen_bond_dist_cutoff
hydrogen_halogen_bond_angle_cutoff
10.
changed hydrogen_bond_angle_cutoff parameter
name to
hydrogen_halogen_bond_angle_cutoff. Added OTHER HALOGEN DIST HERE PARAM
HERE.
11.
Removed ability to toggle on and off cylinder interactions, to simplify UI.
Always on for those interaction where appropriate.
12.
Some interactions are shown as spheres, others as bonds. Keeps it simplier.
13.
Improved ability to detect salt bridges and hydrogen bonds even if protein
and ligand models do not have hydrogen atoms.
14.
Speed improvements
14.
Speed
and memory
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.
17.
If input structure has mmultiple frames, keepsfirst one.
18.
JSON file now includes distances and angles.
19.
output_csv option now also prints csv file containing same information as json.
20.
Possible to toggle ribbon on and off.
21.
Updated documentation.
TODO:
...
...
@@ -40,37 +42,42 @@ bonds per this heuristic:
angle. =O not marked as donor, so don't need to worry about that.
*
Nitrogen cannot donate to more than actual neighbors + hydrogen bonds > 4, as
above.
Are water molecules able to be hydrogen bond donors?
*
chain and resid now included in output PDB files.
Tests on all operating systems (including mobile).
Be sure to compress javascript
Halogen bonds mention in all documentation?
MAke sure not javascript is external.
Test should also test version of protein without hydrogens, and make sure you
get all interactions tested. Metal, halogen, hydrogen with S.
DOCUMENTATION:
METAL_COORDINATION_CUTOFF. Get into web app (DONE), documentation, parameters, etc.
1.
Halogen bonds mention in all documentation?
2.
METAL_COORDINATION_CUTOFF. Get into web app (DONE), documentation,
parameters, etc.
3.
Make sure all documentation/examples account for get_all_interactions
(updated for metal coordination, halogen bonds)
4.
Make sure output_csv parameter documented.
Make sure all documentation/examples account for get_all_interactions (updated for metal coordination, halogen bonds)
finish README.md on file loading component.
hydrogen_halogen_bond_angle_cutoff
halogen_bond_dist_cutoff
metal_coordination_dist_cutoff
output_csv
Check all docstrings on functions.
(COMMAND_LINE_USE updated)
PDBQT in webapp looks strange?
SDF on ligand works?
Test should also test version of protein without hydrogens, and make sure you
get all interactions tested. Metal, halogen, hydrogen with S.
Makesure can loadin multipleligands. Probably need to rewritecodethat triggersbinana run. Also, can run if restar
t.
finish README.md on file loading componen
t.
Make sure output_csv parameter documented.
PDBQT in webapp looks strange?
// And you need a message explaining difference between delete/extract. Also,
// converting files hasn't been implemented
.
**
*
Makesure can loadin multipleligands. Probably need to rewritecodethat
triggersbinana run. Also, can run if restart
.
And you need a message explaining the difference between delete/extract.
2.
0
---
...
...
javascript/lib/__future__.js
View file @
db82c857
// Transcrypt'ed from Python, 2021-11-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0
0
2:43
:20
// Transcrypt'ed from Python, 2021-11-2
3
0
0:01
:20
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 @
db82c857
This diff is collapsed.
Click to expand it.
javascript/lib/binana._structure.atom.js
View file @
db82c857
...
...
@@ -2,14 +2,17 @@
// 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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
var
binana
=
{};
var
math
=
{};
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
{
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
*
as
__module_re__
from
'
./re.js
'
;
__nest__
(
re
,
''
,
__module_re__
);
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
'
;
...
...
@@ -27,6 +30,7 @@ export var Atom = __class__ ('Atom', [object], {
self
.
coordinates
=
Point
(
99999
,
99999
,
99999
);
self
.
element
=
''
;
self
.
pdb_index
=
''
;
self
.
all_atoms_index
=
-
(
1
);
self
.
line
=
''
;
self
.
atom_type
=
''
;
self
.
indecies_of_atoms_connecting
=
[];
...
...
@@ -51,6 +55,7 @@ export var Atom = __class__ ('Atom', [object], {
theatom
.
chain
=
self
.
chain
;
theatom
.
structure
=
self
.
structure
;
theatom
.
comment
=
self
.
comment
;
theatom
.
all_atoms_index
=
self
.
all_atoms_index
;
return
theatom
;
});},
get
string_id
()
{
return
__get__
(
this
,
function
(
self
)
{
...
...
@@ -101,7 +106,13 @@ export var Atom = __class__ ('Atom', [object], {
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
();
var
element
=
line
.
__getslice__
(
76
,
null
,
1
).
strip
().
upper
();
if
(
element
!=
''
)
{
var
two_letters
=
re
.
sub
(
'
[^A-Z]
'
,
''
,
element
).
__getslice__
(
0
,
2
,
1
);
}
else
{
var
two_letters
=
self
.
atom_name
.
__getslice__
(
0
,
2
,
1
).
strip
().
upper
();
}
if
(
__in__
(
two_letters
,
two_leter_atom_names
)
&&
!
__in__
(
self
.
residue
.
__getslice__
(
-
(
3
),
null
,
1
),
protein_resnames
))
{
self
.
element
=
two_letters
;
}
...
...
@@ -136,7 +147,58 @@ export var Atom = __class__ ('Atom', [object], {
self
.
residue
=
'
MOL
'
;
}
});},
get
_has_sp3_geometry_if_protein
()
{
return
__get__
(
this
,
function
(
self
,
resname
)
{
var
atomname
=
self
.
atom_name
.
strip
();
if
(
__in__
(
atomname
,
[
'
C
'
,
'
O
'
,
'
N
'
]))
{
return
false
;
}
if
(
resname
==
'
ARG
'
)
{
if
(
__in__
(
atomname
,
[
'
NE
'
,
'
NH1
'
,
'
NH2
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
ASN
'
)
{
if
(
__in__
(
atomname
,
[
'
CG
'
,
'
OD1
'
,
'
ND2
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
ASP
'
)
{
if
(
__in__
(
atomname
,
[
'
CG
'
,
'
OD1
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
GLN
'
)
{
if
(
__in__
(
atomname
,
[
'
CD
'
,
'
OE1
'
,
'
NE2
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
GLU
'
)
{
if
(
__in__
(
atomname
,
[
'
CD
'
,
'
OE1
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
HIS
'
)
{
if
(
__in__
(
atomname
,
[
'
CG
'
,
'
CD2
'
,
'
NE2
'
,
'
CE1
'
,
'
ND1
'
]))
{
return
false
;
}
}
else
if
(
__in__
(
resname
,
[
'
PHE
'
,
'
TYR
'
]))
{
if
(
__in__
(
atomname
,
[
'
CE1
'
,
'
CZ
'
,
'
CE2
'
,
'
CD2
'
,
'
CG
'
,
'
CD1
'
]))
{
return
false
;
}
}
else
if
(
resname
==
'
TRP
'
)
{
if
(
__in__
(
atomname
,
[
'
CG
'
,
'
CD1
'
,
'
NE1
'
,
'
CE2
'
,
'
CD2
'
,
'
CE3
'
,
'
CZ2
'
,
'
CZ3
'
,
'
CH2
'
]))
{
return
false
;
}
}
return
true
;
});},
get
has_sp3_geometry
()
{
return
__get__
(
this
,
function
(
self
,
parent_mol
)
{
var
resname
=
self
.
residue
.
__getslice__
(
-
(
3
),
null
,
1
);
if
(
__in__
(
resname
,
protein_resnames
))
{
return
self
.
_has_sp3_geometry_if_protein
(
resname
);
}
var
ncrs
=
(
function
()
{
var
__accu0__
=
[];
for
(
var
i
of
self
.
indecies_of_atoms_connecting
)
{
...
...
@@ -161,6 +223,9 @@ export var Atom = __class__ ('Atom', [object], {
}
var
average_angle
=
sum
(
angles
)
/
float
(
len
(
angles
));
return
fabs
(
average_angle
-
109.0
)
<
5.0
;
});},
get
belongs_to_protein
()
{
return
__get__
(
this
,
function
(
self
)
{
return
__in__
(
self
.
residue
.
__getslice__
(
-
(
3
),
null
,
1
),
protein_resnames
);
});}
});
...
...
javascript/lib/binana._structure.consts.js
View file @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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
'
;
...
...
javascript/lib/binana._structure.mol.js
View file @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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
'
;
...
...
@@ -110,6 +110,7 @@ export var Mol = __class__ ('Mol', [object], {
}
if
(
!
__in__
(
key
,
atom_already_loaded
)
||
!
__in__
(
temp_residue
,
protein_resnames
))
{
atom_already_loaded
.
append
(
key
);
temp_atom
.
all_atoms_index
=
autoindex
;
self
.
all_atoms
[
autoindex
]
=
temp_atom
;
if
(
!
__in__
(
temp_atom
.
residue
.
__getslice__
(
-
(
3
),
null
,
1
),
protein_resnames
))
{
self
.
non_protein_atoms
[
autoindex
]
=
temp_atom
;
...
...
@@ -292,11 +293,27 @@ export var Mol = __class__ ('Mol', [object], {
}
var
atom2
=
self
.
non_protein_atoms
[
atom_index2
];
if
(
!
__in__
(
atom2
.
residue
.
__getslice__
(
-
(
3
),
null
,
1
),
protein_resnames
))
{
var
dist
=
distance
(
atom1
.
coordinates
,
atom2
.
coordinates
);
if
(
dist
<
self
.
bond_length
(
atom1
.
element
,
atom2
.
element
)
*
1.2
)
{
atom1
.
add_neighbor_atom_index
(
atom_index2
);
atom2
.
add_neighbor_atom_index
(
atom_index1
);
}
self
.
create_bond_by_distance_between_two_atoms
(
atom1
,
atom2
);
}
}
}
});},
get
create_bond_by_distance_between_two_atoms
()
{
return
__get__
(
this
,
function
(
self
,
atom1
,
atom2
)
{
var
dist
=
distance
(
atom1
.
coordinates
,
atom2
.
coordinates
);
if
(
dist
<
self
.
bond_length
(
atom1
.
element
,
atom2
.
element
)
*
1.2
)
{
atom1
.
add_neighbor_atom_index
(
atom2
.
all_atoms_index
);
atom2
.
add_neighbor_atom_index
(
atom1
.
all_atoms_index
);
}
});},
get
create_bond_by_distance
()
{
return
__get__
(
this
,
function
(
self
,
atom
)
{
var
idx1
=
atom
.
all_atoms_index
;
var
coor1
=
atom
.
coordinates
;
for
(
var
idx2
of
self
.
all_atoms
.
py_keys
())
{
if
(
idx1
!=
idx2
)
{
var
other_atom
=
self
.
all_atoms
[
idx2
];
var
dist
=
distance
(
coor1
,
other_atom
.
coordinates
);
if
(
dist
<
self
.
bond_length
(
atom
.
element
,
other_atom
.
element
)
*
1.2
)
{
atom
.
add_neighbor_atom_index
(
other_atom
.
all_atoms_index
);
}
}
}
...
...
@@ -431,6 +448,9 @@ export var Mol = __class__ ('Mol', [object], {
charaterizations
.
append
([
'
DONOR
'
,
atom
]);
}
}
else
if
(
atom
.
element
==
'
O
'
&&
num_neighbors
==
0
)
{
charaterizations
.
append
([
'
DONOR
'
,
atom
]);
}
else
if
(
atom
.
element
==
'
N
'
)
{
var
is_sp3
=
(
num_neighbors
>
1
?
atom
.
has_sp3_geometry
(
self
)
:
true
);
if
(
is_sp3
&&
num_neighbors
<
4
||
!
(
is_sp3
)
&&
num_neighbors
<
3
)
{
...
...
@@ -514,8 +534,17 @@ export var Mol = __class__ ('Mol', [object], {
}
}
else
if
(
num_neighors
==
1
||
atom
.
has_sp3_geometry
(
self
))
{
var
chrg
=
self
.
Charged
(
atom
.
coordinates
,
[
atom_index
],
true
);
self
.
charges
.
append
(
chrg
);
var
is_in_aromatic_ring
=
any
((
function
()
{
var
__accu0__
=
[];
for
(
var
ring
of
self
.
aromatic_rings
)
{
__accu0__
.
append
(
__in__
(
int
(
atom_index
),
ring
.
indices
));
}
return
py_iter
(
__accu0__
);
})
());
if
(
!
(
is_in_aromatic_ring
))
{
var
chrg
=
self
.
Charged
(
atom
.
coordinates
,
[
atom_index
],
true
);
self
.
charges
.
append
(
chrg
);
}
}
});},
get
charges_carboxylate
()
{
return
__get__
(
this
,
function
(
self
,
atom_index
,
atom
)
{
...
...
@@ -754,6 +783,13 @@ export var Mol = __class__ ('Mol', [object], {
});}
}),
get
add_aromatic_marker
()
{
return
__get__
(
this
,
function
(
self
,
indicies_of_ring
)
{
var
indicies_of_ring
=
(
function
()
{
var
__accu0__
=
[];
for
(
var
i
of
indicies_of_ring
)
{
__accu0__
.
append
(
int
(
i
));
}
return
__accu0__
;
})
();
var
points_list
=
[];
var
total
=
len
(
indicies_of_ring
);
var
x_sum
=
0.0
;
...
...
@@ -829,10 +865,8 @@ export var Mol = __class__ ('Mol', [object], {
for
(
var
ring_index_2
=
0
;
ring_index_2
<
len
(
all_rings
);
ring_index_2
++
)
{
if
(
ring_index_1
!=
ring_index_2
)
{
var
ring2
=
all_rings
[
ring_index_2
];
if
(
len
(
ring2
)
!=
0
)
{
if
(
self
.
set1_is_subset_of_set2
(
ring1
,
ring2
)
==
true
)
{
all_rings
[
ring_index_2
]
=
[];
}
if
(
len
(
ring2
)
!=
0
&&
self
.
set1_is_subset_of_set2
(
ring1
,
ring2
)
==
true
)
{
all_rings
[
ring_index_2
]
=
[];
}
}
}
...
...
@@ -871,7 +905,7 @@ export var Mol = __class__ ('Mol', [object], {
}
}
}
if
(
is_flat
==
false
)
{
if
(
!
(
is_flat
)
)
{
all_rings
[
ring_index
]
=
[];
}
if
(
len
(
ring
)
<
5
)
{
...
...
@@ -894,7 +928,7 @@ export var Mol = __class__ ('Mol', [object], {
for
(
var
atom_index
of
self
.
all_atoms
.
py_keys
())
{
var
atom
=
self
.
all_atoms
[
atom_index
];
var
key
=
(((
atom
.
residue
+
'
_
'
)
+
str
(
atom
.
resid
))
+
'
_
'
)
+
atom
.
chain
;
if
(
first
==
true
)
{
if
(
first
)
{
var
curr_res
=
key
;
var
first
=
false
;
}
...
...
javascript/lib/binana._structure.point.js
View file @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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.js
View file @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
1
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
0
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
3
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
2
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
{
_utils
,
OpenFile
,
shim
};
export
{
OpenFile
,
_utils
,
shim
};
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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
'
;
...
...
javascript/lib/binana.interactions._close.js
View file @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
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 @
db82c857
...
...
@@ -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-2
0 02:43
:2
2
// Transcrypt'ed from Python, 2021-11-2
3 00:01
:2
1
var
__future__
=
{};
var
binana
=
{};
var
math
=
{};
...
...
@@ -57,6 +57,162 @@ export var _product = function (lst1, lst2) {
}
return
combos
;
};
export
var
_collect_bonds
=
function
(
bonds_organized_by_donor
,
pdb_hbonds
,
hbonds
,
hbonds_labels
)
{
var
unwrapped_bond_infos
=
[];
for
(
var
donor_key
of
bonds_organized_by_donor
.
py_keys
())
{
for
(
var
bond_inf
of
bonds_organized_by_donor
[
donor_key
])
{
unwrapped_bond_infos
.
append
(
bond_inf
);
}
}
var
unwrapped_bond_infos
=
sorted
(
unwrapped_bond_infos
,
__kwargtrans__
({
key
:
(
function
__lambda__
(
i
)
{
return
i
[
0
];
})}));
for
(
var
[
idx
,
lig_donor_or_accept
,
receptor_atom
,
ligand_atom
,
center_atom
,
dist
,
angle
]
of
unwrapped_bond_infos
)
{
_update_mol_and_data
(
pdb_hbonds
,
hbonds
,
hbonds_labels
,
lig_donor_or_accept
,
receptor_atom
,
ligand_atom
,
center_atom
,
dist
,
angle
);
}
};
export
var
_score_angle_deviation_from_sp3_sp2
=
function
(
angle
,
donor_has_sp3_geometry
)
{
if
(
donor_has_sp3_geometry
===
null
)
{
var
diff
=
min
(
fabs
(
109
-
angle
),
fabs
(
120
-
angle
));
var
min_angle
=
89
;
var
max_angle
=
150
;
}
else
if
(
donor_has_sp3_geometry
==
true
)
{
var
diff
=
fabs
(
109
-
angle
);
var
min_angle
=
89
;
var
max_angle
=
129
;
}
else
{
var
min_angle
=
100
;
var
max_angle
=
150
;
var
diff
=
fabs
(
120
-
angle
);
}
return
tuple
([
diff
,
angle
<
min_angle
||
angle
>
max_angle
]);
};
export
var
_select_acceptor
=
function
(
lig
,
recep
,
lig_donor_or_accept
)
{
return
(
lig_donor_or_accept
==
'
ACCEPTOR
'
?
lig
:
recep
);
};
export
var
_remo