Commit 3d9aa613 authored by jdurrant's avatar jdurrant
Browse files

Updates.

parent eca8dc31
Changes
=======
2.1 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_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 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.
22. chain and resid now included in output PDB files.
23. Throws a warning when using Python 2. Only Python 3 now offically supported.
24. Added link to the app where users can learn more about how interactions are
detected, advanced parameters.
# Changes
## 2.1 WIP
1. Web-browser app: changes to how interactions are displayed.
- Now possible to visualize multiple interactions at once. Select
interactions are turned on by default.
- Bonds are now color coded.
- Now possible to toggle the receptor ribbon representation.
- Changed text of "Clear" button to "Reset" because it resets the
visualization to the default.
- To simplify the visualization:
- Some interactions are now shown as spheres, and others as bonds.
- Removed the ability to toggle cylinder-representation interactions. These
are always on for those interactions where cylinder representations are
appropriate.
- Removed ability to color by molecule, interaction, etc.
2. Web-browser app: changes to output download (via "Save" button).
- JSZip library is now a dynamic import (loaded only when needed).
- Added PNG file.
- Added `log.txt` file for those not comfortable with JSON.
- Added VMD state file.
3. Web-browser app: Miscellaneous
- If an input structure includes multiple frames, the web app retains only
the first frame.
- Revised the file-input system. Aside from loading files from their local
computers, users can now also specify PDB IDs. They can also delete
non-protein residues or use a non-protein residue as the ligand.
- Added a link that allows users to learn more about how interactions are
detected, advanced BINANA parameters, etc.
4. Changes to how interactions are detected.
- Sulfur atoms can now serve as hydrogen bond donors and acceptors.
- BINANA can now better detect salt bridges and hydrogen bonds even if
protein and ligand models do not include hydrogen atoms, though using
protonated models does improve accuracy.
- Added the ability to detect halogen bonds. The `hydrogen_bond_angle_cutoff`
parameter has been renamed `hydrogen_halogen_bond_angle_cutoff`, and a new
parameter `halogen_bond_dist_cutoff` has been added.
- Added the ability to detect metal coordination bonds. Added
`metal_coordination_dist_cutoff` parameter.
5. Changes to the output files
- The VMD state file is now centered on the ligand when opened in VMD.
- The output JSON file now includes bond distances and angles.
- BINANA can now output a CSV file with the same information in the JSON
file. Added the `output_csv` parameter.
- Output PDB files now include the chain and residue ids.
6. Other changes of note
- Speed and memory-use improvements.
- BINANA throws a warning when using Python 2. Only Python 3 is now
officially supported.
- Substantial updates to the documentation.
TODO:
......@@ -42,10 +61,7 @@ Tests on all operating systems (including mobile).
Push updated documentation somewhere. (just rsync, works).
Cruft? Good to check throughout.
2.0
---
## 2.0
1. We have refactored the code to make it more modular. BINANA still works as a
command-line program, but it now also functions as a Python library, allowing
......@@ -70,8 +86,7 @@ Cruft? Good to check throughout.
9. We release BINANA 2.0 under a more permissive license than previous versions
(Apache License, Version 2.0).
1.3
---
## 1.3
1. BINANA now requires Python3. Python2 support has been discontinued.
2. Added documentation files in MarkDown format.
......@@ -80,8 +95,7 @@ Cruft? Good to check throughout.
5. Added roadmap.
6. Updated example files, now located at `examples/`.
1.2.0
-----
## 1.2.0
1. The version previously hosted on
[SourceForge](https://sourceforge.net/projects/binana/).
......@@ -70,3 +70,8 @@ accessed from the web browser (e.g., from web apps).
- `./javascript/lib/Examples.ipynb.pdf`: A PDF version of the notebook, for
those who don't use Jupyter.
- `./javascript/lib/examples.html`: An HTML file demonstrating use.
## Web-browser app
A [video tutorial](https://youtu.be/BMnSYvH4Qwg) describes how to use the
[BINANA web-browser app](http://durrantlab.com/binana).
\ No newline at end of file
......@@ -4,7 +4,7 @@
'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{OpenFile}from"./binana._utils.shim.js";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};var __name__="binana.fs";export var save_file=function(filename,text){var f=OpenFile(filename,"w");f.write(text);f.close()};export var ls=function(){print(shim.fake_fs.py_keys())};export var load_file=function(filename){var f=OpenFile(filename,"r");var txt=f.read();f.close();return txt};
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";import*as shim from"./binana._utils.shim.js";import*as _utils from"./binana._utils.js";import*as __module_binana__ from"./binana.js";__nest__(binana,"",__module_binana__);export{shim,OpenFile,
_utils};var __name__="binana.fs";export var save_file=function(filename,text){var f=OpenFile(filename,"w");f.write(text);f.close()};export var ls=function(){print(shim.fake_fs.py_keys())};export var load_file=function(filename){var f=OpenFile(filename,"r");var txt=f.read();f.close();return txt};
//# sourceMappingURL=binana.fs.map
\ No newline at end of file
......@@ -7,10 +7,10 @@ __ipow__,__irshift__,__isub__,__ixor__,__jsUsePyNext__,__jsmod__,__k__,__kwargtr
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{METAL_COORDINATION_DIST_CUTOFF}from"./binana.interactions.default_params.js";import*as _metal_coordination from"./binana.interactions._metal_coordination.js";import*as _closest from"./binana.interactions._closest.js";import*as _close from"./binana.interactions._close.js";
import*as _electrostatic_energies from"./binana.interactions._electrostatic_energies.js";import*as _flexibility from"./binana.interactions._flexibility.js";import*as _hydrophobics from"./binana.interactions._hydrophobics.js";import*as _hydrogen_halogen_bonds from"./binana.interactions._hydrogen_halogen_bonds.js";import*as _ligand_atom_types from"./binana.interactions._ligand_atom_types.js";import*as _pi_pi from"./binana.interactions._pi_pi.js";import*as _salt_bridges from"./binana.interactions._salt_bridges.js";
import*as _cat_pi from"./binana.interactions._cat_pi.js";import*as __module_binana_interactions__ from"./binana.interactions.js";__nest__(binana,"interactions",__module_binana_interactions__);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,HALOGEN_BOND_DIST_CUTOFF,HYDROGEN_BOND_DIST_CUTOFF,HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF,
HYDROPHOBIC_DIST_CUTOFF,PI_PADDING_DIST,PI_PI_INTERACTING_DIST_CUTOFF,PI_STACKING_ANGLE_TOLERANCE,SALT_BRIDGE_DIST_CUTOFF,T_STACKING_ANGLE_TOLERANCE,T_STACKING_CLOSEST_DIST_CUTOFF}from"./binana.interactions.default_params.js";import{_set_default}from"./binana._utils.shim.js";import*as default_params from"./binana.interactions.default_params.js";export{_hydrophobics,SALT_BRIDGE_DIST_CUTOFF,_closest,HYDROPHOBIC_DIST_CUTOFF,_ligand_atom_types,ELECTROSTATIC_DIST_CUTOFF,HALOGEN_BOND_DIST_CUTOFF,_electrostatic_energies,
HYDROGEN_BOND_DIST_CUTOFF,HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF,PI_PI_INTERACTING_DIST_CUTOFF,default_params,_metal_coordination,PI_STACKING_ANGLE_TOLERANCE,_hydrogen_halogen_bonds,_salt_bridges,_cat_pi,CATION_PI_DIST_CUTOFF,PI_PADDING_DIST,_set_default,_close,METAL_COORDINATION_DIST_CUTOFF,_pi_pi,T_STACKING_ANGLE_TOLERANCE,CLOSE_CONTACTS_DIST2_CUTOFF,T_STACKING_CLOSEST_DIST_CUTOFF,CLOSE_CONTACTS_DIST1_CUTOFF,ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF,_flexibility};var __name__="binana.interactions";export var get_cation_pi=
function(ligand,receptor,cutoff,pi_padding){if(typeof cutoff=="undefined"||cutoff!=null&&cutoff.hasOwnProperty("__kwargtrans__"))var cutoff=null;if(typeof pi_padding=="undefined"||pi_padding!=null&&pi_padding.hasOwnProperty("__kwargtrans__"))var pi_padding=null;var cutoff=_set_default(cutoff,CATION_PI_DIST_CUTOFF);var pi_padding=_set_default(pi_padding,PI_PADDING_DIST);return _cat_pi.get_cation_pi(ligand,receptor,cutoff,pi_padding)};export var get_salt_bridges=function(ligand,receptor,cutoff){if(typeof cutoff==
"undefined"||cutoff!=null&&cutoff.hasOwnProperty("__kwargtrans__"))var cutoff=null;var cutoff=_set_default(cutoff,SALT_BRIDGE_DIST_CUTOFF);return _salt_bridges.get_salt_bridges(ligand,receptor,cutoff)};export var get_pi_pi=function(ligand,receptor,pi_pi_general_dist_cutoff,pi_stacking_angle_tol,t_stacking_angle_tol,t_stacking_closest_dist_cutoff,pi_padding){if(typeof pi_pi_general_dist_cutoff=="undefined"||pi_pi_general_dist_cutoff!=null&&pi_pi_general_dist_cutoff.hasOwnProperty("__kwargtrans__"))var pi_pi_general_dist_cutoff=
HYDROPHOBIC_DIST_CUTOFF,PI_PADDING_DIST,PI_PI_INTERACTING_DIST_CUTOFF,PI_STACKING_ANGLE_TOLERANCE,SALT_BRIDGE_DIST_CUTOFF,T_STACKING_ANGLE_TOLERANCE,T_STACKING_CLOSEST_DIST_CUTOFF}from"./binana.interactions.default_params.js";import{_set_default}from"./binana._utils.shim.js";import*as default_params from"./binana.interactions.default_params.js";export{T_STACKING_ANGLE_TOLERANCE,_cat_pi,_metal_coordination,_pi_pi,_flexibility,PI_STACKING_ANGLE_TOLERANCE,CLOSE_CONTACTS_DIST2_CUTOFF,HALOGEN_BOND_DIST_CUTOFF,
HYDROGEN_HALOGEN_BOND_ANGLE_CUTOFF,PI_PI_INTERACTING_DIST_CUTOFF,ACTIVE_SITE_FLEXIBILITY_DIST_CUTOFF,_ligand_atom_types,_hydrogen_halogen_bonds,HYDROGEN_BOND_DIST_CUTOFF,_closest,default_params,PI_PADDING_DIST,CLOSE_CONTACTS_DIST1_CUTOFF,_hydrophobics,ELECTROSTATIC_DIST_CUTOFF,_electrostatic_energies,T_STACKING_CLOSEST_DIST_CUTOFF,CATION_PI_DIST_CUTOFF,_close,_set_default,_salt_bridges,SALT_BRIDGE_DIST_CUTOFF,METAL_COORDINATION_DIST_CUTOFF,HYDROPHOBIC_DIST_CUTOFF};var __name__="binana.interactions";
export var get_cation_pi=function(ligand,receptor,cutoff,pi_padding){if(typeof cutoff=="undefined"||cutoff!=null&&cutoff.hasOwnProperty("__kwargtrans__"))var cutoff=null;if(typeof pi_padding=="undefined"||pi_padding!=null&&pi_padding.hasOwnProperty("__kwargtrans__"))var pi_padding=null;var cutoff=_set_default(cutoff,CATION_PI_DIST_CUTOFF);var pi_padding=_set_default(pi_padding,PI_PADDING_DIST);return _cat_pi.get_cation_pi(ligand,receptor,cutoff,pi_padding)};export var get_salt_bridges=function(ligand,
receptor,cutoff){if(typeof cutoff=="undefined"||cutoff!=null&&cutoff.hasOwnProperty("__kwargtrans__"))var cutoff=null;var cutoff=_set_default(cutoff,SALT_BRIDGE_DIST_CUTOFF);return _salt_bridges.get_salt_bridges(ligand,receptor,cutoff)};export var get_pi_pi=function(ligand,receptor,pi_pi_general_dist_cutoff,pi_stacking_angle_tol,t_stacking_angle_tol,t_stacking_closest_dist_cutoff,pi_padding){if(typeof pi_pi_general_dist_cutoff=="undefined"||pi_pi_general_dist_cutoff!=null&&pi_pi_general_dist_cutoff.hasOwnProperty("__kwargtrans__"))var pi_pi_general_dist_cutoff=
null;if(typeof pi_stacking_angle_tol=="undefined"||pi_stacking_angle_tol!=null&&pi_stacking_angle_tol.hasOwnProperty("__kwargtrans__"))var pi_stacking_angle_tol=null;if(typeof t_stacking_angle_tol=="undefined"||t_stacking_angle_tol!=null&&t_stacking_angle_tol.hasOwnProperty("__kwargtrans__"))var t_stacking_angle_tol=null;if(typeof t_stacking_closest_dist_cutoff=="undefined"||t_stacking_closest_dist_cutoff!=null&&t_stacking_closest_dist_cutoff.hasOwnProperty("__kwargtrans__"))var t_stacking_closest_dist_cutoff=
null;if(typeof pi_padding=="undefined"||pi_padding!=null&&pi_padding.hasOwnProperty("__kwargtrans__"))var pi_padding=null;var pi_pi_general_dist_cutoff=_set_default(pi_pi_general_dist_cutoff,PI_PI_INTERACTING_DIST_CUTOFF);var pi_stacking_angle_tol=_set_default(pi_stacking_angle_tol,PI_STACKING_ANGLE_TOLERANCE);var t_stacking_angle_tol=_set_default(t_stacking_angle_tol,T_STACKING_ANGLE_TOLERANCE);var t_stacking_closest_dist_cutoff=_set_default(t_stacking_closest_dist_cutoff,T_STACKING_CLOSEST_DIST_CUTOFF);
var pi_padding=_set_default(pi_padding,PI_PADDING_DIST);return _pi_pi.get_pi_pi(ligand,receptor,pi_pi_general_dist_cutoff,pi_stacking_angle_tol,t_stacking_angle_tol,t_stacking_closest_dist_cutoff,pi_padding)};export var get_ligand_atom_types=function(ligand){return _ligand_atom_types.get_ligand_atom_types(ligand)};export var get_hydrogen_bonds=function(ligand,receptor,dist_cutoff,angle_cutoff){if(typeof dist_cutoff=="undefined"||dist_cutoff!=null&&dist_cutoff.hasOwnProperty("__kwargtrans__"))var dist_cutoff=
......
......@@ -5,7 +5,7 @@
'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 _get_params from"./binana._cli_params._get_params.js";import*as _start from"./binana._start.js";import*as output from"./binana.output.js";import*as interactions from"./binana.interactions.js";import*as load_ligand_receptor from"./binana.load_ligand_receptor.js";
import*as fs from"./binana.fs.js";import*as __module_binana__ from"./binana.js";__nest__(binana,"",__module_binana__);export{_get_params,interactions,_start,load_ligand_receptor,fs,output};var __name__="__main__";export var _sys=binana.sys;export var run=function(args){if(typeof args=="undefined"||args!=null&&args.hasOwnProperty("__kwargtrans__"))var args=null;console.warn("You probably don't want to call this using JavaScript (Python-only function).");if(args===null)var args=_sys.argv.__getslice__(0,
import*as fs from"./binana.fs.js";import*as __module_binana__ from"./binana.js";__nest__(binana,"",__module_binana__);export{load_ligand_receptor,_get_params,interactions,fs,output,_start};var __name__="__main__";export var _sys=binana.sys;export var run=function(args){if(typeof args=="undefined"||args!=null&&args.hasOwnProperty("__kwargtrans__"))var args=null;console.warn("You probably don't want to call this using JavaScript (Python-only function).");if(args===null)var args=_sys.argv.__getslice__(0,
null,1);else for(var [i,a]of enumerate(args))args[i]=str(a);var cmd_params=_get_params.CommandLineParameters(args);if(cmd_params.params["test"])return;else if(cmd_params.okay_to_proceed()==false){print("Error: You need to specify the ligand and receptor PDBQT files to analyze using\nthe -receptor and -ligand tags from the command line.\n");_sys.exit(0);return}if(cmd_params.error!=""){print("Warning: The following command-line parameters were not recognized:");print(" "+cmd_params.error+"\n")}_start._get_all_interactions(cmd_params)};
//# sourceMappingURL=binana.map
\ No newline at end of file
......@@ -5,7 +5,7 @@
'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 _math_functions from"./binana._utils._math_functions.js";import{Mol as _Mol}from"./binana._structure.mol.js";import{Point as _Point}from"./binana._structure.point.js";import{pi,sqrt}from"./math.js";import*as __module_binana__ from"./binana.js";
__nest__(binana,"",__module_binana__);export{_Mol,_math_functions,sqrt,_Point,pi};var __name__="binana.load_ligand_receptor";export var _ligand_receptor_dists_cache=dict({});export var _ligand_receptor_aromatic_dists=null;export var from_texts=function(ligand_text,receptor_text,max_cutoff){if(typeof max_cutoff=="undefined"||max_cutoff!=null&&max_cutoff.hasOwnProperty("__kwargtrans__"))var max_cutoff=null;var ligand=_Mol();ligand.load_pdb_from_text(ligand_text);var receptor=_Mol();if(max_cutoff===
__nest__(binana,"",__module_binana__);export{_math_functions,pi,sqrt,_Mol,_Point};var __name__="binana.load_ligand_receptor";export var _ligand_receptor_dists_cache=dict({});export var _ligand_receptor_aromatic_dists=null;export var from_texts=function(ligand_text,receptor_text,max_cutoff){if(typeof max_cutoff=="undefined"||max_cutoff!=null&&max_cutoff.hasOwnProperty("__kwargtrans__"))var max_cutoff=null;var ligand=_Mol();ligand.load_pdb_from_text(ligand_text);var receptor=_Mol();if(max_cutoff===
null)receptor.load_pdb_from_text(receptor_text);else receptor.load_pdb_from_text(receptor_text,null,ligand.min_x-max_cutoff,ligand.max_x+max_cutoff,ligand.min_y-max_cutoff,ligand.max_y+max_cutoff,ligand.min_z-max_cutoff,ligand.max_z+max_cutoff);receptor.assign_secondary_structure();_clear_cache();return tuple([ligand,receptor])};export var from_files=function(ligand_filename,receptor_filename,max_cutoff){if(typeof max_cutoff=="undefined"||max_cutoff!=null&&max_cutoff.hasOwnProperty("__kwargtrans__"))var max_cutoff=
null;var ligand=_Mol();ligand.load_pdb_file(ligand_filename);var receptor=_Mol();if(max_cutoff===null)receptor.load_pdb_file(receptor_filename);else receptor.load_pdb_file(receptor_filename,ligand.min_x-max_cutoff,ligand.max_x+max_cutoff,ligand.min_y-max_cutoff,ligand.max_y+max_cutoff,ligand.min_z-max_cutoff,ligand.max_z+max_cutoff);receptor.assign_secondary_structure();_clear_cache();return tuple([ligand,receptor])};export var _clear_cache=function(){_ligand_receptor_dists_cache=dict({});_ligand_receptor_aromatic_dists=
null};export var _get_coor_mol_dists=function(atom,coor,mol_all_atoms,max_dist_sqr,dist_inf_list){for(var mol_atom of mol_all_atoms){var mol_coor=mol_atom.coordinates;var delta_x=mol_coor.x-coor.x;var summed=delta_x*delta_x;if(summed>max_dist_sqr)continue;var delta_y=mol_coor.y-coor.y;summed+=delta_y*delta_y;if(summed>max_dist_sqr)continue;var delta_z=mol_coor.z-coor.z;summed+=delta_z*delta_z;if(summed>max_dist_sqr)continue;var dist=sqrt(summed);var val=tuple([atom,mol_atom,dist]);dist_inf_list.append(val)}};
......
......@@ -5,7 +5,7 @@
'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 shim from"./binana._utils.shim.js";import*as __module_binana__ from"./binana.js";__nest__(binana,"",__module_binana__);import*as vmd_state from"./binana.output._directory.vmd_state.js";import*as pdbs from"./binana.output._directory.pdbs.js";
export{pdbs,shim,vmd_state};var __name__="binana.output._directory";export var os=shim;export var make_directory_output=function(parameters,closest,close,active_site_flexibility,hydrophobics,hydrogen_bonds,halogen_bonds,pi_pi,cat_pi,salt_bridges,metal_coordinations,ligand,receptor){if(!os.path.exists(parameters.params["output_dir"]))os.mkdir(parameters.params["output_dir"]);binana.output._directory.pdbs.output_dir_pdbs(closest["mol"],parameters,close["mol"],active_site_flexibility["mols"]["alpha_helix"],
export{shim,vmd_state,pdbs};var __name__="binana.output._directory";export var os=shim;export var make_directory_output=function(parameters,closest,close,active_site_flexibility,hydrophobics,hydrogen_bonds,halogen_bonds,pi_pi,cat_pi,salt_bridges,metal_coordinations,ligand,receptor){if(!os.path.exists(parameters.params["output_dir"]))os.mkdir(parameters.params["output_dir"]);binana.output._directory.pdbs.output_dir_pdbs(closest["mol"],parameters,close["mol"],active_site_flexibility["mols"]["alpha_helix"],
active_site_flexibility["mols"]["beta_sheet"],active_site_flexibility["mols"]["other_2nd_structure"],active_site_flexibility["mols"]["back_bone"],active_site_flexibility["mols"]["side_chain"],hydrophobics["mol"],hydrogen_bonds["mol"],halogen_bonds["mol"],pi_pi["mols"]["pi_stacking"],pi_pi["mols"]["T_stacking"],cat_pi["mol"],salt_bridges["mol"],metal_coordinations["mol"],ligand,receptor);binana.output._directory.vmd_state.vmd_state_file(parameters)};
//# sourceMappingURL=binana.output._directory.map
\ No newline at end of file
......@@ -5,7 +5,7 @@
'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{OpenFile as _openFile}from"./binana._utils.shim.js";import*as _json from"./binana._utils.shim.js";import*as __module_binana__ from"./binana.js";__nest__(binana,"",__module_binana__);import*as pdb_file from"./binana.output.pdb_file.js";
import*as _log from"./binana.output._log.js";import*as csv from"./binana.output.csv.js";import*as dictionary from"./binana.output.dictionary.js";import*as _directory from"./binana.output._directory.js";export{_openFile,_json,pdb_file,csv,dictionary,_log,_directory};var __name__="binana.output";export var _write_main=function(parameters,ligand,receptor,closest,close,hydrophobics,hydrogen_bonds,halogen_bonds,salt_bridges,metal_coordinations,pi_pi,cat_pi,electrostatic_energies,active_site_flexibility,
import*as _log from"./binana.output._log.js";import*as csv from"./binana.output.csv.js";import*as dictionary from"./binana.output.dictionary.js";import*as _directory from"./binana.output._directory.js";export{_openFile,_json,dictionary,_log,pdb_file,_directory,csv};var __name__="binana.output";export var _write_main=function(parameters,ligand,receptor,closest,close,hydrophobics,hydrogen_bonds,halogen_bonds,salt_bridges,metal_coordinations,pi_pi,cat_pi,electrostatic_energies,active_site_flexibility,
ligand_atom_types){var json_output=binana.output.dictionary.collect(closest,close,hydrophobics,hydrogen_bonds,halogen_bonds,salt_bridges,metal_coordinations,pi_pi,cat_pi,electrostatic_energies,active_site_flexibility,ligand_atom_types,__kwargtrans__({ligand_rotatable_bonds:ligand.rotatable_bonds_count}));var log_output=binana.output._log.collect(parameters,ligand,closest,close,hydrophobics,hydrogen_bonds,halogen_bonds,salt_bridges,metal_coordinations,pi_pi,cat_pi,electrostatic_energies,active_site_flexibility,
ligand_atom_types,json_output);if(parameters.params["output_csv"]!=""){var csv_txt=csv.collect(json_output);var f=_openFile(parameters.params["output_csv"],"w");f.write(csv_txt);f.close()}if(parameters.params["output_json"]!=""){var f=_openFile(parameters.params["output_json"],"w");f.write(_json.dumps(json_output,__kwargtrans__({indent:2,sort_keys:true,separators:tuple([",",": "])})));f.close()}if(parameters.params["output_file"]!="")binana.output.pdb_file.write(ligand,receptor,closest,close,hydrophobics,
hydrogen_bonds,halogen_bonds,salt_bridges,metal_coordinations,pi_pi,cat_pi,active_site_flexibility,log_output,false,parameters.params["output_file"]);if(parameters.params["output_dir"]!="")_directory.make_directory_output(parameters,closest,close,active_site_flexibility,hydrophobics,hydrogen_bonds,halogen_bonds,pi_pi,cat_pi,salt_bridges,metal_coordinations,ligand,receptor)};
......
......@@ -11,7 +11,7 @@
"dependencies": {
"3dmol": "^1.6.1",
"bootstrap": "^4.5.3",
"bootstrap-vue": "^2.19.0",
"bootstrap-vue": "^2.21.2",
"file-saver": "^2.0.5",
"google-closure-compiler": "^20210601.0.0",
"jszip": "^3.5.0",
......@@ -97,9 +97,9 @@
}
},
"node_modules/@nuxt/opencollective/node_modules/chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
......@@ -1046,9 +1046,9 @@
}
},
"node_modules/bootstrap-vue": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.19.0.tgz",
"integrity": "sha512-IjAXUSrRU5Qu9x3uwUcoj6LtysKbCVeWoJOsODyI/WokStUr95M+tTIajXUjIrB/Nsk0fS+RNvZnm2sWeNFrhg==",
"version": "2.21.2",
"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.21.2.tgz",
"integrity": "sha512-0Exe+4MZysqhZNXIKf4TzkvXaupxh9EHsoCRez0o5Dc0J7rlafayOEwql63qXv74CgZO8E4U8ugRNJko1vMvNw==",
"hasInstallScript": true,
"dependencies": {
"@nuxt/opencollective": "^0.3.2",
......@@ -1793,9 +1793,9 @@
}
},
"node_modules/consola": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.0.tgz",
"integrity": "sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ=="
"version": "2.15.3",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
"integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw=="
},
"node_modules/console-browserify": {
"version": "1.2.0",
......@@ -6524,9 +6524,12 @@
}
},
"node_modules/node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
}
......@@ -10151,6 +10154,11 @@
"integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=",
"dev": true
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/tryer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
......@@ -10823,6 +10831,11 @@
"minimalistic-assert": "^1.0.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/webpack": {
"version": "4.46.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz",
......@@ -11245,6 +11258,15 @@
"node": ">=0.8.0"
}
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
......@@ -11436,9 +11458,9 @@
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
......@@ -12258,9 +12280,9 @@
"requires": {}
},
"bootstrap-vue": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.19.0.tgz",
"integrity": "sha512-IjAXUSrRU5Qu9x3uwUcoj6LtysKbCVeWoJOsODyI/WokStUr95M+tTIajXUjIrB/Nsk0fS+RNvZnm2sWeNFrhg==",
"version": "2.21.2",
"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.21.2.tgz",
"integrity": "sha512-0Exe+4MZysqhZNXIKf4TzkvXaupxh9EHsoCRez0o5Dc0J7rlafayOEwql63qXv74CgZO8E4U8ugRNJko1vMvNw==",
"requires": {
"@nuxt/opencollective": "^0.3.2",
"bootstrap": ">=4.5.3 <5.0.0",
......@@ -12893,9 +12915,9 @@
"dev": true
},
"consola": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.0.tgz",
"integrity": "sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ=="
"version": "2.15.3",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
"integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw=="
},
"console-browserify": {
"version": "1.2.0",
......@@ -16664,9 +16686,12 @@
}
},
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-libs-browser": {
"version": "2.2.1",
......@@ -19647,6 +19672,11 @@
"integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=",
"dev": true
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"tryer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
......@@ -20200,6 +20230,11 @@
"minimalistic-assert": "^1.0.0"
}
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"webpack": {
"version": "4.46.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz",
......@@ -20520,6 +20555,15 @@
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
"dev": true
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
......
......@@ -41,7 +41,7 @@
"dependencies": {
"3dmol": "^1.6.1",
"bootstrap": "^4.5.3",
"bootstrap-vue": "^2.19.0",
"bootstrap-vue": "^2.21.2",
"file-saver": "^2.0.5",
"google-closure-compiler": "^20210601.0.0",
"jszip": "^3.5.0",
......
......@@ -31,15 +31,6 @@ let computedFunctions = {
// return ((this.hasLabel === true) && (this["labelToLeft"] === true)) ? 2 : 0;
},
/**
* Determines if label should be placed to the left or above. Number of
* columns for the label width 'md' screens and up.
* @returns number Returns 2 if it has a label, 0 otherwise.
*/
"labelColsMd"(): number {
return ((this.hasLabel === true) && (this["labelToLeft"] === true)) ? 2 : 0;
}
}
/**
......@@ -58,16 +49,14 @@ export function setupFileLoaderFormGroup(): void {
"computed": computedFunctions,
"template": /* html */ `
<span class="file-loader-form-group">
<!-- :label-cols="labelCols"
:label-cols-lg="labelColsMd" -->
<b-form-group
v-if="formGroupWrapper"
:label="label"
:label-for="id"
:id="'input-group-' + id"
:style="styl"
:label-cols="0"
:label-cols-md="labelColsMd"
label-cols="0"
label-cols-xl="1"
>
<slot></slot>
<small
......@@ -101,7 +90,8 @@ export function setupFileLoaderFormGroup(): void {
},
"methods": {},
"mounted"() {
addCSS(`.file-loader-form-group .col-form-label { hyphens: auto; max-width: 100px !important; }`);
addCSS(`.file-loader-form-group .col-form-label { hyphens: auto; }`);
// max-width: 100px !important;
}
})
}
......@@ -127,13 +127,12 @@ function checkInvalidFiles(invalidFiles: IFileInfo[], exts: string[], acceptable
}
function splitPDBLikeFile(fileInfo: IFileInfo, multipleFiles: boolean): IFileInfo[] {
//2M30
// Some files are PDB like and might have multiple frames. Good to split
// those.
// those. For example, 2M30.
let pdbTxt = fileInfo.fileContents;
if (pdbTxt.match(/^(ATOM|HETATM)/gm) != null) {
// Let's assume it's a pdb. Thanks codex.
let pdbTxtModels = pdbTxt.split(/^(MODEL\s+?\d+?\s+?|ENDMDL\s+?)$/gm);
let pdbTxtModels = pdbTxt.split(/^(MODEL\s+?\d+?\s+?|^ENDMDL\s+?)/gm);
let fileInfos: IFileInfo[] = [];
for (let pdbTxtModel of pdbTxtModels) {
let atomLines = getAtomLines(pdbTxtModel);
......
......@@ -11,10 +11,12 @@ let computedFunctions = {
* the value meets min/max requirements, etc.*/
"val": {
get(): any {
return this.$store.state["binanaParams"][this["id"]];
let name = this["id"];
return this.$store.state["binanaParams"][name];
},
set(val: any): void {
// debugger
// Save the value to the store
val = (val === "") ? undefined : +val;
if (isNaN(val)) {
......@@ -28,8 +30,9 @@ let computedFunctions = {
// Determine if it is valid. First, make sure there's
// something here if its required.
let valid = true;
let scoreOnly = this.$store.state["binanaParams"]["score_only"];
if ((this["required"] === true) && (scoreOnly !== true)) {
// let scoreOnly = this.$store.state["binanaParams"]["score_only"];
// if ((this["required"] === true) && (scoreOnly !== true)) {
if (this["required"] === true) {
this["invalidMsg"] = "This field is required.";
valid = val !== undefined;
}
......@@ -45,8 +48,9 @@ let computedFunctions = {
valid = false;
}
let name = this["id"];
this.$store.commit("setValidationParam", {
name: this["id"],
name: name,
val: valid
});
}
......@@ -66,8 +70,10 @@ let computedFunctions = {
* @returns boolean True if it is valid, false otherwise.
*/
"isValid"(): boolean {
let val = this.$store.state["validation"][this["id"]];
return val;
// DEPRECIATED
return true;
// let val = this.$store.state["validation"][this["id"]];
// return val;
}
}
......@@ -109,7 +115,7 @@ export function setup(): void {
}
},
"computed": computedFunctions,
"template": `
"template": /*html*/ `
<form-group
:label="label"
:id="'input-group-' + id"
......@@ -135,7 +141,10 @@ export function setup(): void {
"id": String,
"description": String,
"placeholder": String,
"required": Boolean,
"required": {
"type": Boolean,
"default": false
},
"styl": String,
"default": Number,
"formGroupWrapper": {
......
......@@ -653,8 +653,8 @@ export function setup(): void {
></mol-loader>
<!-- , 'url-input']" -->
<form-button @click.native="useExampleInputFiles" cls="float-right">Use Example Files</form-button> <!-- variant="default" -->
<form-button @click.native="videoTutorial" cls="float-right mr-2">Video Tutorial</form-button> <!-- variant="default" -->