The torsions fronted serves as the frontend of the torsions server. Furthermore, it is also the basis to generate the local GUI application for the TorsionAnalyzer. More information can be found in the following publication:
Patrick Penner, Wolfgang Guba, Robert Schmidt, Agnes Meyder, Martin Stahl, and Matthias Rarey. (submitted). The Torsion Library: Semi-automated Improvement of Torsion Rules with SMARTScompare.
This particular frontend was an experiment in low-tech JS development. As such it explicitly avoids node and npm as much as possible. The local branch does use node and electron to deploy the static JS frontend as a standalone GUI.
Tests are based on the standalone version of the jasmine testing framework. They can be
run by opening the SpecRunner.html in the browser of your choice, for example:
firefox test/SpecRunner.htmlOne file on the local branch hast to be tested with node integration. While on the local branch, this can be done
with either:
npm run test... or with:
npx jasmine test/TorsionAnalyzerWrapperSpec.jsJS code on the main branch can be built into a distributable package with the make_dist.sh script:
./make_dist.shThis will fill the dist directory with all static files that need to be served in order for the frontend to work.
Switch to the local branch and install the npm dependencies. These are necessary to package code into an electron app.
To correctly package the electron app ensure that the bin/ directory exists and contains a TorsionAnalyzer binary for
the target platform. Furthermore, check that there is a distributable version of the Torsion Library in torsion_lib/,
as well as CSD and PDB plots for all the torsion rules. An electron app can then be packaged using:
npx electron-packager ./ --platform=<linux,darwin,win32>This should produce a torsion_analyzer_local* directory that contains everything the local application needs to run.