Commit 6c2f57df authored by jdurrant's avatar jdurrant
Browse files

Halogen bonds, updates to web-app UI, etc.

parent aefbf6cf
Changes
=======
WIP
---
1. Can select multiple interactions at once.
2. PNG file included in download from "Save" button. Also, log.txt file, for those not comfortable with JSON.
3. Bonds now color coded.
4. Certain interactions turned on by default.
5. Clear button changed to "Reset" because resets to default value.
6. No more coloring by molecule, interaction, etc. Too confusing.
7. JSZip now dynamic import.
8. zip download now includes vmd state directory.
9. Vmd state file centers on ligand automatically.
10. changed hydrogen_bond_dist_cutoff and hydrogen_bond_angle_cutoff parameter names to hydrogen_halogen_bond_dist_cutoff
hydrogen_halogen_bond_angle_cutoff
11. Removed ability to toggle on and off cylinder interactions, to simplify UI. Always on for those interaction where appropriate.
12. Some interactions are shown as spheres, others as bonds. Keeps it simplier.
Halogen bonds mention in all documentation?
Halogen bonds counted twice? Good to check. In the chart in log file.
2.0
---
......
......@@ -95,8 +95,8 @@ python3 run_binana.py -receptor /path/to/receptor.pdbqt -ligand /path/to/ligand.
Though we recommend using program defaults, the following command-line tags can
also be specified: `-close_contacts_dist1_cutoff` `-close_contacts_dist2_cutoff`
`-electrostatic_dist_cutoff` `-active_site_flexibility_dist_cutoff`
`-hydrophobic_dist_cutoff` `-hydrogen_bond_dist_cutoff`
`-hydrogen_bond_angle_cutoff` `-pi_padding_dist`
`-hydrophobic_dist_cutoff` `-hydrogen_halogen_bond_dist_cutoff`
`-hydrogen_halogen_bond_angle_cutoff` `-pi_padding_dist`
`-pi_pi_interacting_dist_cutoff` `-pi_stacking_angle_tolerance`
`-T_stacking_angle_tolerance` `-T_stacking_closest_dist_cutoff`
`-cation_pi_dist_cutoff` `-salt_bridge_dist_cutoff`
......@@ -105,7 +105,7 @@ For example, if you want to tell BINANA to detect only hydrogen bonds where the
donor and acceptor are less than 3.0 angstroms distant, run:
```bash
python3 run_binana.py -receptor /path/to/receptor.pdbqt -ligand /path/to/ligand.pdbqt -hydrogen_bond_dist_cutoff 3.0
python3 run_binana.py -receptor /path/to/receptor.pdbqt -ligand /path/to/ligand.pdbqt -hydrogen_halogen_bond_dist_cutoff 3.0
```
What follows is a detailed description of the BINANA algorithm and a further
......@@ -195,9 +195,9 @@ BINANA allows hydroxyl and amine groups to act as hydrogen-bond donors. Oxygen
and nitrogen atoms can act as hydrogen-bond acceptors. Fairly liberal cutoffs
are implemented in order to accommodate low-resolution crystal structures. A
hydrogen bond is identified if the hydrogen-bond donor comes within
`hydrogen_bond_dist_cutoff` angstroms of the hydrogen-bond acceptor, and the
`hydrogen_halogen_bond_dist_cutoff` angstroms of the hydrogen-bond acceptor, and the
angle formed between the donor, the hydrogen atom, and the acceptor is no
greater than `hydrogen_bond_angle_cutoff` degrees. BINANA tallies the number of
greater than `hydrogen_halogen_bond_angle_cutoff` degrees. BINANA tallies the number of
hydrogen bonds according to the secondary structure of the receptor atom, the
side-chain/backbone status of the receptor atom, and the location (ligand or
receptor) of the hydrogen bond donor. Thus there are twelve possible
......
......@@ -7,7 +7,7 @@ rm -rf ../python/__target__/ ./lib/
# Compile the python file.
cd ../python/
# --nomin
transcrypt --build --ecom --verbose binana.py
transcrypt --build --nomin --ecom --verbose binana.py
cd -
# Move the javascript library to the lib directory.
......
'use strict';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=[];
// Transcrypt'ed from Python, 2021-11-05 16:24: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 = [];
//# sourceMappingURL=__future__.map
\ No newline at end of file
......@@ -2,14 +2,89 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
'use strict';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_BOND_ANGLE_CUTOFF,
HYDROGEN_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";var __name__="binana._cli_params._get_params";export var os=binana.os;export var CommandLineParameters=__class__("CommandLineParameters",[object],{__module__:__name__,params:dict({}),get is_num(){return __get__(this,
function(self,num){try{var t=float(num);return t}catch(__except0__){if(isinstance(__except0__,ValueError))return num;else throw __except0__;}})},get __init__(){return __get__(this,function(self,parameters){self.params["close_contacts_dist1_cutoff"]=CLOSE_CONTACTS_DIST1_CUTOFF;self.params["close_contacts_dist2_cutoff"]=CLOSE_CONTACTS_DIST2_CUTOFF;self.params["electrostatic_dist_cutoff"]=ELECTROSTATIC_DIST_CUTOFF;self.params["active_site_flexibility_dist_cutoff"]=ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF;
self.params["hydrophobic_dist_cutoff"]=HYDROPHOBIC_DIST_CUTOFF;self.params["hydrogen_bond_dist_cutoff"]=HYDROGEN_BOND_DIST_CUTOFF;self.params["hydrogen_bond_angle_cutoff"]=HYDROGEN_BOND_ANGLE_CUTOFF;self.params["pi_padding_dist"]=PI_PADDING_DIST;self.params["pi_pi_interacting_dist_cutoff"]=PI_PI_INTERACTING_DIST_CUTOFF;self.params["pi_stacking_angle_tolerance"]=PI_STACKING_ANGLE_TOLERANCE;self.params["T_stacking_angle_tolerance"]=T_STACKING_ANGLE_TOLERANCE;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["receptor"]=RECEPTOR;self.params["ligand"]=LIGAND;self.params["output_dir"]=OUTPUT_DIR;self.params["output_file"]=OUTPUT_FILE;self.params["output_json"]=OUTPUT_JSON;self.params["test"]=TEST;for(var index=0;index<len(parameters);index++){var item=parameters[index];if(len(item)>0&&item[0]=="-"){var key=item.py_replace("-","");var value=
self.is_num(parameters[index+1]);if(__in__(key,list(self.params.py_keys()))){self.params[key]=value;parameters[index]="";parameters[index+1]=""}}}self.error="";for(var index=1;index<len(parameters);index++){var item=parameters[index];if(item!="")self.error=self.error+item+" "}if(self.params["output_dir"]!=""&&self.params["output_dir"].__getslice__(-1,null,1)!=os.sep)self.params["output_dir"]=self.params["output_dir"]+os.sep;var single_output_files=[tuple(["output_file","pdb"]),tuple(["output_json",
"json"])];for(var [single_output_file,ext]of single_output_files)if(self.params["output_dir"]!=""&&self.params[single_output_file]=="")self.params[single_output_file]=self.params["output_dir"]+"output."+ext})},get okay_to_proceed(){return __get__(this,function(self){if(self.params["receptor"]!=""&&self.params["ligand"]!="")return true;else return false})}});
// Transcrypt'ed from Python, 2021-11-05 16:24:08
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';
var __name__ = 'binana._cli_params._get_params';
export var sep = '/';
export var CommandLineParameters = __class__ ('CommandLineParameters', [object], {
__module__: __name__,
params: dict ({}),
get is_num () {return __get__ (this, function (self, num) {
try {
var t = float (num);
return t;
}
catch (__except0__) {
if (isinstance (__except0__, ValueError)) {
return num;
}
else {
throw __except0__;
}
}
});},
get __init__ () {return __get__ (this, function (self, parameters) {
self.params ['close_contacts_dist1_cutoff'] = CLOSE_CONTACTS_DIST1_CUTOFF;
self.params ['close_contacts_dist2_cutoff'] = CLOSE_CONTACTS_DIST2_CUTOFF;
self.params ['electrostatic_dist_cutoff'] = ELECTROSTATIC_DIST_CUTOFF;
self.params ['active_site_flexibility_dist_cutoff'] = ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF;
self.params ['hydrophobic_dist_cutoff'] = HYDROPHOBIC_DIST_CUTOFF;
self.params ['hydrogen_halogen_bond_dist_cutoff'] = HYDROGEN_HALOGEN_BOND_DIST_CUTOFF;
self.params ['hydrogen_halogen_bond_angle_cutoff'] = HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF;
self.params ['pi_padding_dist'] = PI_PADDING_DIST;
self.params ['pi_pi_interacting_dist_cutoff'] = PI_PI_INTERACTING_DIST_CUTOFF;
self.params ['pi_stacking_angle_tolerance'] = PI_STACKING_ANGLE_TOLERANCE;
self.params ['T_stacking_angle_tolerance'] = T_STACKING_ANGLE_TOLERANCE;
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 ['receptor'] = RECEPTOR;
self.params ['ligand'] = LIGAND;
self.params ['output_dir'] = OUTPUT_DIR;
self.params ['output_file'] = OUTPUT_FILE;
self.params ['output_json'] = OUTPUT_JSON;
self.params ['test'] = TEST;
for (var index = 0; index < len (parameters); index++) {
var item = parameters [index];
if (len (item) > 0 && item [0] == '-') {
var key = item.py_replace ('-', '');
var value = self.is_num (parameters [index + 1]);
if (__in__ (key, list (self.params.py_keys ()))) {
self.params [key] = value;
parameters [index] = '';
parameters [index + 1] = '';
}
}
}
self.error = '';
for (var index = 1; index < len (parameters); index++) {
var item = parameters [index];
if (item != '') {
self.error = (self.error + item) + ' ';
}
}
if (self.params ['output_dir'] != '' && self.params ['output_dir'].__getslice__ (-(1), null, 1) != sep) {
self.params ['output_dir'] = self.params ['output_dir'] + sep;
}
var single_output_files = [tuple (['output_file', 'pdb']), tuple (['output_json', 'json'])];
for (var [single_output_file, ext] of single_output_files) {
if (self.params ['output_dir'] != '' && self.params [single_output_file] == '') {
self.params [single_output_file] = (self.params ['output_dir'] + 'output.') + ext;
}
}
});},
get okay_to_proceed () {return __get__ (this, function (self) {
if (self.params ['receptor'] != '' && self.params ['ligand'] != '') {
return true;
}
else {
return false;
}
});}
});
//# sourceMappingURL=binana._cli_params._get_params.map
\ No newline at end of file
This diff is collapsed.
......@@ -2,17 +2,169 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
'use strict';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{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__);var __name__="binana._structure.atom";
export var Atom=__class__("Atom",[object],{__module__:__name__,get __init__(){return __get__(this,function(self){self.atom_name="";self.residue="";self.coordinates=Point(99999,99999,99999);self.element="";self.pdb_index="";self.line="";self.atom_type="";self.indecies_of_atoms_connecting=[];self.charge=0;self.resid=0;self.chain="";self.structure="";self.comment=""})},get copy_of(){return __get__(this,function(self){var theatom=Atom();theatom.atom_name=self.atom_name;theatom.residue=self.residue;theatom.coordinates=
self.coordinates.copy_of();theatom.element=self.element;theatom.pdb_index=self.pdb_index;theatom.line=self.line;theatom.atom_type=self.atom_type;theatom.indecies_of_atoms_connecting=self.indecies_of_atoms_connecting.__getslice__(0,null,1);theatom.charge=self.charge;theatom.resid=self.resid;theatom.chain=self.chain;theatom.structure=self.structure;theatom.comment=self.comment;return theatom})},get string_id(){return __get__(this,function(self){var to_return="";if(self.chain.strip()!="")var to_return=
to_return+self.chain.strip()+":";var to_return=to_return+self.residue.strip()+"("+str(self.resid)+"):"+self.atom_name.strip()+"("+str(self.pdb_index)+")";return to_return})},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);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))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")return"BACKBONE";else return"SIDECHAIN"})},get read_pdb_line(){return __get__(this,function(self,line){self.line=line;self.atom_name=line.__getslice__(11,16,1).strip();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)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;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";else{self.element=self.atom_name;self.element=self.element.py_replace("0","");self.element=self.element.py_replace("1","");self.element=self.element.py_replace("2","");self.element=self.element.py_replace("3","");self.element=
self.element.py_replace("4","");self.element=self.element.py_replace("5","");self.element=self.element.py_replace("6","");self.element=self.element.py_replace("7","");self.element=self.element.py_replace("8","");self.element=self.element.py_replace("9","");self.element=self.element.py_replace("@","");self.element=self.element.__getslice__(0,1,1).strip().upper()}}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))}catch(__except0__){}self.chain=line.__getslice__(21,22,1);if(self.chain==" ")self.chain="X";if(self.residue.strip()=="")self.residue=" MOL"})}});
// Transcrypt'ed from Python, 2021-11-05 16:24: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 {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__);
var __name__ = 'binana._structure.atom';
export var Atom = __class__ ('Atom', [object], {
__module__: __name__,
get __init__ () {return __get__ (this, function (self) {
self.atom_name = '';
self.residue = '';
self.coordinates = Point (99999, 99999, 99999);
self.element = '';
self.pdb_index = '';
self.line = '';
self.atom_type = '';
self.indecies_of_atoms_connecting = [];
self.charge = 0;
self.resid = 0;
self.chain = '';
self.structure = '';
self.comment = '';
});},
get copy_of () {return __get__ (this, function (self) {
var theatom = Atom ();
theatom.atom_name = self.atom_name;
theatom.residue = self.residue;
theatom.coordinates = self.coordinates.copy_of ();
theatom.element = self.element;
theatom.pdb_index = self.pdb_index;
theatom.line = self.line;
theatom.atom_type = self.atom_type;
theatom.indecies_of_atoms_connecting = self.indecies_of_atoms_connecting.__getslice__ (0, null, 1);
theatom.charge = self.charge;
theatom.resid = self.resid;
theatom.chain = self.chain;
theatom.structure = self.structure;
theatom.comment = self.comment;
return theatom;
});},
get string_id () {return __get__ (this, function (self) {
var to_return = '';
if (self.chain.strip () != '') {
var to_return = (to_return + self.chain.strip ()) + ':';
}
var to_return = (((((((to_return + self.residue.strip ()) + '(') + str (self.resid)) + '):') + self.atom_name.strip ()) + '(') + str (self.pdb_index)) + ')';
return to_return;
});},
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);
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))) {
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') {
return 'BACKBONE';
}
else {
return 'SIDECHAIN';
}
});},
get read_pdb_line () {return __get__ (this, function (self, line) {
self.line = line;
self.atom_name = line.__getslice__ (11, 16, 1).strip ();
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) {
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;
}
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';
}
else {
self.element = self.atom_name;
self.element = self.element.py_replace ('0', '');
self.element = self.element.py_replace ('1', '');
self.element = self.element.py_replace ('2', '');
self.element = self.element.py_replace ('3', '');
self.element = self.element.py_replace ('4', '');
self.element = self.element.py_replace ('5', '');
self.element = self.element.py_replace ('6', '');
self.element = self.element.py_replace ('7', '');
self.element = self.element.py_replace ('8', '');
self.element = self.element.py_replace ('9', '');
self.element = self.element.py_replace ('@', '');
self.element = self.element.__getslice__ (0, 1, 1).strip ().upper ();
}
}
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));
}
catch (__except0__) {
// pass;
}
self.chain = line.__getslice__ (21, 22, 1);
if (self.chain == ' ') {
self.chain = 'X';
}
if (self.residue.strip () == '') {
self.residue = ' MOL';
}
});}
});
//# sourceMappingURL=binana._structure.atom.map
\ No newline at end of file
This diff is collapsed.
......@@ -2,11 +2,55 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
'use strict';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{r_just,round_to_thousandths_to_str}from"./binana._utils.shim.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.point";export var Point=__class__("Point",[object],{__module__:__name__,x:99999,y:99999,z:99999,get __init__(){return __get__(this,function(self,x,y,z){self.x=x;self.y=y;self.z=z})},get copy_of(){return __get__(this,function(self){return Point(self.x,self.y,self.z)})},get print_coors(){return __get__(this,function(self){print(str(self.x)+"\t"+str(self.y)+"\t"+str(self.z))})},get snap(){return __get__(this,function(self,reso){self.x=round(self.x/reso)*reso;self.y=round(self.y/
reso)*reso;self.z=round(self.z/reso)*reso})},get dist_to(){return __get__(this,function(self,apoint){return math.sqrt(math.pow(self.x-apoint.x,2)+math.pow(self.y-apoint.y,2)+math.pow(self.z-apoint.z,2))})},get description(){return __get__(this,function(self){return str(self.x)+" "+str(self.y)+" "+str(self.z)})},get magnitude(){return __get__(this,function(self){return self.dist_to(Point(0,0,0))})},get create_pdb_line(){return __get__(this,function(self,index){var output="ATOM ";var output=output+
r_just(str(index),6)+r_just("X",5)+r_just("XXX",4);var output=output+r_just(round_to_thousandths_to_str(self.x),18);var output=output+r_just(round_to_thousandths_to_str(self.y),8);var output=output+r_just(round_to_thousandths_to_str(self.z),8);var output=output+r_just("X",24);return output})}});
// Transcrypt'ed from Python, 2021-11-05 16:24: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';
import {r_just, round_to_thousandths_to_str} from './binana._utils.shim.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.point';
export var Point = __class__ ('Point', [object], {
__module__: __name__,
x: 99999.0,
y: 99999.0,
z: 99999.0,
get __init__ () {return __get__ (this, function (self, x, y, z) {
self.x = x;
self.y = y;
self.z = z;
});},
get copy_of () {return __get__ (this, function (self) {
return Point (self.x, self.y, self.z);
});},
get print_coors () {return __get__ (this, function (self) {
print ((((str (self.x) + '\t') + str (self.y)) + '\t') + str (self.z));
});},
get snap () {return __get__ (this, function (self, reso) {
self.x = round (self.x / reso) * reso;
self.y = round (self.y / reso) * reso;
self.z = round (self.z / reso) * reso;
});},
get dist_to () {return __get__ (this, function (self, apoint) {
return math.sqrt ((math.pow (self.x - apoint.x, 2) + math.pow (self.y - apoint.y, 2)) + math.pow (self.z - apoint.z, 2));
});},
get description () {return __get__ (this, function (self) {
return (((str (self.x) + ' ') + str (self.y)) + ' ') + str (self.z);
});},
get magnitude () {return __get__ (this, function (self) {
return self.dist_to (Point (0, 0, 0));
});},
get create_pdb_line () {return __get__ (this, function (self, index) {
var output = 'ATOM ';
var output = ((output + r_just (str (index), 6)) + r_just ('X', 5)) + r_just ('XXX', 4);
var output = output + r_just (round_to_thousandths_to_str (self.x), 18);
var output = output + r_just (round_to_thousandths_to_str (self.y), 8);
var output = output + r_just (round_to_thousandths_to_str (self.z), 8);
var output = output + r_just ('X', 24);
return output;
});}
});
//# sourceMappingURL=binana._structure.point.map
\ No newline at end of file
......@@ -2,16 +2,131 @@
// LICENSE.md or go to https://opensource.org/licenses/Apache-2.0 for full
// details. Copyright 2020 Jacob D. Durrant.
'use strict';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{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._utils._math_functions";export var planrity=function(point1,point2,point3,point4){var x1=point1.x;var y1=point1.y;var z1=point1.z;var x2=point2.x;var y2=point2.y;var z2=point2.z;var x3=point3.x;var y3=point3.y;var z3=point3.z;var x4=point4.x;var y4=point4.y;var z4=point4.z;var A=y1*(z2-z3)+y2*(z3-z1)+y3*(z1-z2);var B=z1*(x2-x3)+z2*(x3-x1)+z3*(x1-x2);var C=x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2);var D=-x1*(y2*z3-y3*z2)+-x2*(y3*z1-y1*z3)+-x3*(y1*z2-y2*z1);var distance=
fabs(A*x4+B*y4+C*z4+D)/math.sqrt(math.pow(A,2)+math.pow(B,2)+math.pow(C,2));var A1=y1*(z2-z4)+y2*(z4-z1)+y4*(z1-z2);var B1=z1*(x2-x4)+z2*(x4-x1)+z4*(x1-x2);var C1=x1*(y2-y4)+x2*(y4-y1)+x4*(y1-y2);var D1=-x1*(y2*z4-y4*z2)+-x2*(y4*z1-y1*z4)+-x4*(y1*z2-y2*z1);var distance1=fabs(A1*x3+B1*y3+C1*z3+D1)/math.sqrt(math.pow(A1,2)+math.pow(B1,2)+math.pow(C1,2));var A2=y1*(z4-z3)+y4*(z3-z1)+y3*(z1-z4);var B2=z1*(x4-x3)+z4*(x3-x1)+z3*(x1-x4);var C2=x1*(y4-y3)+x4*(y3-y1)+x3*(y1-y4);var D2=-x1*(y4*z3-y3*z4)+-x4*
(y3*z1-y1*z3)+-x3*(y1*z4-y4*z1);var distance2=fabs(A2*x2+B2*y2+C2*z2+D2)/math.sqrt(math.pow(A2,2)+math.pow(B2,2)+math.pow(C2,2));var A3=y4*(z2-z3)+y2*(z3-z4)+y3*(z4-z2);var B3=z4*(x2-x3)+z2*(x3-x4)+z3*(x4-x2);var C3=x4*(y2-y3)+x2*(y3-y4)+x3*(y4-y2);var D3=-x4*(y2*z3-y3*z2)+-x2*(y3*z4-y4*z3)+-x3*(y4*z2-y2*z4);var distance3=fabs(A3*x1+B3*y1+C3*z1+D3)/math.sqrt(math.pow(A3,2)+math.pow(B3,2)+math.pow(C3,2));var final_dist=-1;if(distance<distance1&&distance<distance2&&distance<distance3)var final_dist=
distance;else if(distance1<distance&&distance1<distance2&&distance1<distance3)var final_dist=distance1;else if(distance2<distance&&distance2<distance1&&distance2<distance3)var final_dist=distance2;else if(distance3<distance&&distance3<distance1&&distance3<distance2)var final_dist=distance3;return final_dist};export var vector_subtraction=function(vector1,vector2){return Point(vector1.x-vector2.x,vector1.y-vector2.y,vector1.z-vector2.z)};export var cross_product=function(pt1,pt2){var response=Point(0,
0,0);response.x=pt1.y*pt2.z-pt1.z*pt2.y;response.y=pt1.z*pt2.x-pt1.x*pt2.z;response.z=pt1.x*pt2.y-pt1.y*pt2.x;return response};export var vector_scalar_multiply=function(vector,scalar){return Point(vector.x*scalar,vector.y*scalar,vector.z*scalar)};export var dot_product=function(point1,point2){return point1.x*point2.x+point1.y*point2.y+point1.z*point2.z};export var dihedral=function(point1,point2,point3,point4){var b1=vector_subtraction(point2,point1);var b2=vector_subtraction(point3,point2);var b3=
vector_subtraction(point4,point3);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};export var angle_between_three_points=function(point1,point2,point3){var vector1=vector_subtraction(point1,point2);var vector2=vector_subtraction(point3,point2);return angle_between_points(vector1,vector2)};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)var dot_prod=1;if(dot_prod<-1)var dot_prod=-1;return math.acos(dot_prod)};export var return_normalized_vector=function(vector){var dist=distance(Point(0,0,0),vector);return Point(vector.x/dist,vector.y/dist,vector.z/dist)};export var distance=function(point1,point2){var deltax=point1.x-point2.x;var deltay=point1.y-point2.y;var deltaz=point1.z-point2.z;return math.sqrt(math.pow(deltax,
2)+math.pow(deltay,2)+math.pow(deltaz,2))};export var project_point_onto_plane=function(a_point,plane_coefficients){var a=plane_coefficients[0];var b=plane_coefficients[1];var c=plane_coefficients[2];var d=plane_coefficients[3];var s=a_point.x;var u=a_point.y;var v=a_point.z;var t=(d-a*s-b*u-c*v)/(a*a+b*b+c*c);var x=s+a*t;var y=u+b*t;var z=v+c*t;return Point(x,y,z)};
// Transcrypt'ed from Python, 2021-11-05 16:24: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';
import {fabs} 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._utils._math_functions';
export var planrity = function (point1, point2, point3, point4) {
var x1 = point1.x;
var y1 = point1.y;
var z1 = point1.z;
var x2 = point2.x;
var y2 = point2.y;
var z2 = point2.z;
var x3 = point3.x;
var y3 = point3.y;