aclarkxyz / web_molkit Goto Github PK
View Code? Open in Web Editor NEWWeb Molecular Toolkit: cheminformatics functionality in TypeScript
Web Molecular Toolkit: cheminformatics functionality in TypeScript
Paste this into a sketcher:
SketchEl!(34,36)
S=11.5263,3.7501;0,0,i0
S=6.3301,-5.2501;0,0,i0
O=6.3301,3.7501;0,0,i1
O=3.7320,-0.7500;0,0,i1
O=10.2273,0.0002;0,0,i0
O=8.9283,-2.2501;0,0,i0
O=1.1338,3.7501;0,0,i0
O=3.7320,5.2501;0,0,i1
N=5.0310,-3.0001;0,0,i0
N=8.9283,3.7501;0,0,i0
N=7.6293,-3.0001;0,0,i0
N=10.2273,1.5000;0,0,i0
C=6.3301,0.7500;0,0,i1
C=6.3301,-0.7500;0,0,i0
C=7.6293,1.5000;0,0,i0
C=5.0310,1.5000;0,0,i0
C=7.6293,3.0001;0,0,i0
C=5.0310,-1.5000;0,0,i0
C=8.9283,0.7500;0,0,i0
C=7.6293,-1.5000;0,0,i0
C=5.0310,3.0001;0,0,i1
C=3.7320,0.7500;0,0,i1
C=8.9283,5.2501;0,0,i2
C=3.7320,-3.7501;0,0,i2
C=6.3301,-3.7501;0,0,i0
C=10.2273,3.0001;0,0,i0
C=3.7320,3.7501;0,0,i0
C=2.4328,1.5000;0,0,i1
C=2.4328,3.0001;0,0,i0
C=3.7320,-5.2501;0,0,i3
C=10.2273,6.0001;0,0,i3
C=12.8255,3.0001;0,0,i3
C=7.6293,-6.0001;0,0,i3
C=-0.1652,3.0001;0,0,i3
1-26=1,0
1-32=1,0
2-25=1,0
2-33=1,0
3-17=1,0
4-18=1,0
5-19=2,0
6-20=2,0
7-29=1,0
7-34=1,0
8-27=1,0
9-18=1,0
9-24=1,0
9-25=1,0
10-17=1,0
10-23=1,0
10-26=1,0
11-20=1,0
11-25=2,0
12-19=1,0
12-26=2,0
13-14=1,0
13-15=1,0
13-16=1,0
14-18=2,0
14-20=1,0
15-17=2,0
15-19=1,0
16-21=2,0
16-22=1,0
21-27=1,0
22-28=2,0
23-31=1,0
24-30=1,0
27-29=2,0
28-29=1,0
!End
... and watch the madness happen.
For generating SVG: take out the attribute defining the xlink namespace; and replace xlink:href with just plain href.
Display this:
SketchEl!(9,9)
C=0.5555,0.1616;0,0,i1
C=1.8545,0.9116;0,0,i0
C=1.8545,2.4116;0,0,i1
C=0.5555,3.1616;0,0,i0
C=-0.7436,2.4116;0,0,i1
C=-0.7436,0.9116;0,0,i0
N|O{2}=-2.0426,0.1616;0,0,i0,aSketchEl!(4\002C3)\000A*\003D-0.7436\002C0.9116\003B0\002C0\002Ci0\000AN\003D-2.0426\002C0.1616\003B1\002C0\002Ci0\000AO\003D-2.0426\002C-1.3384\003B0\002C0\002Ci0\000AO\003D-3.3416\002C0.9116\003B-1\002C0\002Ci0\000A1-2\003D1\002C0\000A2-3\003D2\002C0\000A2-4\003D1\002C0\000A!End\000A
N|O{2}=3.1535,0.1616;0,0,i0,aSketchEl!(4\002C3)\000A*\003D1.8545\002C0.9116\003B0\002C0\002Ci0\000AN\003D3.1535\002C0.1616\003B1\002C0\002Ci0\000AO\003D4.4526\002C0.9115\003B0\002C0\002Ci0\000AO\003D3.1536\002C-1.3384\003B-1\002C0\002Ci0\000A2-3\003D2\002C0\000A2-4\003D1\002C0\000A2-1\003D1\002C0\000A!End\000A
{^t}Bu=0.5555,4.6616;0,0,i0,aSketchEl!(5\002C4)\000A*\003D0.5555\002C3.1616\003B0\002C0\002Ci0\000AC\003D0.5555\002C4.6616\003B0\002C0\002Ci0\000AC\003D-0.9445\002C4.6616\003B0\002C0\002Ci3\000AC\003D2.0555\002C4.6616\003B0\002C0\002Ci3\000AC\003D0.5555\002C6.1616\003B0\002C0\002Ci3\000A2-3\003D1\002C0\000A2-4\003D1\002C0\000A2-5\003D1\002C0\000A2-1\003D1\002C0\000A!End\000A
1-2=2,0
2-3=1,0
3-4=2,0
4-5=1,0
5-6=2,0
6-1=1,0
6-7=1,0
2-8=1,0
4-9=1,0
!End
... line to tBu is off.
Make one. (After finishing the atom dialog)
... as an alternative to Canvas.
Take a JQuery object and create all the bits.
Calls prompt
, which seems to be deprecated. Need to replace it with a proper edit dialog.
e.g. create "Os" and hit the "tetragonal" button; doesn't add bonds. It should.
Make the platform code have a static member: "CommandKeyType" = {Ctrl/Command}; default value is undefined; can override externally.
For Electron/Platform (in WME) make it poke the useragent.
Restore the functionality to where it applies.
Stub panels: Abbrev, Geom, Query, Extra
... rather than atom type "A". Same as MolNote.
Arrow keys for navigating current atom/bond, ENTER = launch edit dialog (atom/bond)
... and bring in an adamantane test case.
... should display the carbon explicitly.
Use navigator.userAgentData
if available, navigator.userAgent
if not; remove use of navigator.platform
.
See http://blog.teamtreehouse.com/building-html5-context-menus for demo code
Implement it for sketcher: try adding useful functionality in context menu
<menu type="context" id="menu">
<menuitem label="Foo1" onclick="foo1()" icon="foo1.png"></menuitem>
<menuitem label="Foo2" onclick="foo2()" icon="foo2.png"></menuitem>
</menu>
...
<div id="target" contextmenu="menu">Right-click here to see the menu.</div>
Create a new nitrogen atom, drag-from with single bond; only one destination angle, and it's wrong. (Works fine for carbon.)
In order to run the code on IE11, it must be compiled to ES5. Iterating over sets is not supported in this case. It is therefore necessary to convert the Set
first to an Array using Array.from(set)
.
Line 239 in BayesianModels.ts
needs to be changed:
// double duty: use the same source material to add up the numeric predictor as well (note that the "coverage" hashes are not necessarily
// the same as the approved list)
let pred = 0;
for (let h of Array.from(predHashes))
{
let c = this.contribs[<any>h];
if (c != null) pred += c;
}
This bugs out with an error:
Mrv2118 01282217312D
10 9 0 0 0 0 999 V2000
-0.7145 -0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.6039 1.2375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.3645 -0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
0.1105 1.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.1105 2.4750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.8250 1.2375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.8250 0.4125 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0
0.1105 0.0000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
1.5395 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.5395 -0.8250 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1 8 1 0 0 0 0
9 3 1 0 0 0 0
2 4 1 0 0 0 0
4 5 1 0 0 0 0
4 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 1 0 0 0
7 9 1 0 0 0 0
9 10 2 0 0 0 0
M STY 1 1 SUP
M SAL 1 8 2 4 5 6 7 8 9 10
M SBL 1 2 1 2
M SMT 1 Leu
M SAP 1 2 8 1 Al 9 3 Br
M SCL 1 AA
M END
If the window has scrolled down, need to sync up with that, and also make the grey-out background cover the whole document.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.