-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.js
276 lines (246 loc) · 7.81 KB
/
init.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/*
Release
Finish JP's structure, it has 305 AAs
That other map
Time oneself
Thesis
Publication
A picture for the cover of Acta D?
Hodgkin/reaction diffusion/testosterone - lol
While you're not holding it it should probably be rotating. And be close to the camera.
Aaaaand ideally you want to render, not from the back, but from the back OR the place that the mesh begins
Could be very helpful for wave functions.
Surely useful for electromagnetism.
Could put a "handle" at the back of it, i.e. a black box rendered with THREE.BackSide
Dorothy Hodgkin thing
Diffusive tensor imaging
Heart. It's 3D reaction diffusion, you can draw the filaments, come on
Maaaaybe "orientation field" with Ivan
lower dimensional analogy is moving hand around 2D
It starts out all neutral orientation
So you draw some lines (or points) and those do get set in stone
Every point becomes a weighted average of the value at those curves nearest to it
Bunch of transparent copies of the controller mesh probably. instancing!
RD is nice because it is continuous and 2D
Maybe, since you're in the company of bloody biologists,
you should ask them about inference and bayesianism and priors and all that
They really could use a version of R.
and know more about how they're getting along with formalization!
Reasons it's hard
Ladder of abstraction stuff, everything matters at all length and time scales.
"chaotic" and overly "detailed" in the sense that you change one nucleotide and a lot changes
So you lose some rigor
abundance of data
there's just a lot of stuff happenning
Much of quantum mechanics worked for light then it worked for things other than light, was fine
An ideal mathematical biologist would be aware of everything - CS, information theory, PDEs...
Experiments can take a long time (though at least we can do them unlike geology or macroeconomics)
Cultural - this is the part that could be fixed
Different little fields
People don't like statistical inference
Or coding or equations
TODO
Highlighting working better
Thereby to get chain selector being not terrible
Maybe even pivoting on chain selector?
chain continuing
ramachandran
Would be nice to fix crap about being up or down =/
Deleter
Get it on web
Ideals
Copy and paste 3D blocks of atoms
Complex-to-look-at 3D things
probe dots
Alt conformers; opacity?
Manually aligning tomograms?
Anisotropic atoms? There may be some interesting stuff here
NCS; Crystallography only tho https://www.youtube.com/watch?v=7QbPvVA-wRQ
Those little webbings on Coot's amide planes
Ligands and stuff carry their "theoretical" density with them. Couldn't have that shit in normal coot, too much overlapping!
Place atom at pointer
Should replace ligand builder, "add oxt to residue"
Water, calcium, magnesium, Sodium, chlorine, bromine, SO4, PO4
Metrics (have to come from coot)
Mutate
Could "just" have the bonds all be springs
Coot tutorial including EM tutorial
Change map color
Unmodelled blobs
"Density fit analysis"
Merge
Urgh that's a ballache, have to make sure it works perfectly with coot
Fit loop
Refmac
Waters
Symmetry atoms
"undo"
Just coot undo, then get the result? Full refresh
Button on controller reserved
Flash or something
Hydrogen hiding really should be automatic
check on atom deletion
Everything in "panel demo"
Octree selection
easy: "hand distances"
Non-vr head movement sensetivity demo
"Carbon alpha mode" (/skeletonize?), often used when zoomed out: graphics_to_ca_representation, get_bonds_representation
NMR data should totally be in there, a set of springs
ambient occlusion maps for all?
"Take screenshot"
Beyond
Back and forth
IMOD, an EM software with manual manipulation, might also benefit from VRification
Radio
Optimise getting map from coot
Bugs/checks
Sometimes you start it and you're below the floor
Sometimes you start it and the hands don't work
bug with some residues highlighting many residues?
Firefox: sometimes it just doesn't start. setAnimationLoop is set, but loop is not called
"onletgo" things
VR Games to get maybe
UI interest
redout / dirt, might have more ui stuff?
Vanishing realms
sublevel zero
Elite dangerous?
hover junkers
Form
Fun
Superhypercube
thumper
Hotdogs, horseshoes and hand grenades
violent stuff
superhot
Sairento
Fallout 4
Both
Lone echo
Maya
Admin
reddit/bluecollarwomen
http://www.nts.org.uk/wildlifesurvey/
http://www.wildlifeinformation.co.uk/about_volunteering.php
Humane extermination?
Who counts the badgers? Conducts the surveys for the government?
RSPCA inspector. Possibly too traumatic
Police dog handler
Lab animal caretaker
Park naturalist
Rehabilitator?
*/
function init()
{
// if(!WEBVR.checkAvailability())
// {
// console.error("No webvr!")
// return;
// }
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.localClippingEnabled = true;
renderer.sortObjects = false;
document.body.appendChild( renderer.domElement );
renderer.vr.enabled = true;
initSocket();
socket.commandReactions["you aren't connected to coot"] = function()
{
// fakeCootConnectedInit()
nonCootConnectedInit()
}
socket.commandReactions["model"] = function(msg)
{
makeModelFromCootString( msg.modelDataString );
}
function base64ToArrayBuffer(base64String)
{
var binary_string = atob(base64String);
var len = binary_string.length;
var bytes = new Uint8Array( len );
for (var i = 0; i < len; i++)
{
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}
socket.commandReactions["map"] = function(msg)
{
log("todo, deleters assume no connection")
let myArrayBuffer = base64ToArrayBuffer( msg["dataString"] )
let newMap = Map( myArrayBuffer );
}
socket.commandReactions["mapFilename"] = function(msg)
{
loadMap(msg.mapFilename)
// let newMap = Map( msg["dataString"], false );
}
initPanel();
initMiscPanelButtons();
initPdbLoader()
initSurroundings();
initVisiBox();
assemblage.position.z = -0.9
assemblage.scale.setScalar( 0.04 ); //0.04 means no visibox wasted, 0.028 is nice, 0.01 fits on screen
scene.add(assemblage);
let windowResize = function()
{
renderer.setSize( window.innerWidth, window.innerHeight );
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
}
window.addEventListener( 'resize', windowResize)
initScaleStick();
// initKeyboardInput();
// initMonomerReceiver()
// initMenus();
// initSpecatorRepresentation();
initModelCreationSystem();
initMapCreationSystem()
initStats();
initHands()
initDisplayManager()
setCurrentHeadPositionAsCenter = function()
{
HACKY_HAND_ADDITION_REMOVE.sub(camera.position)
renderer.vr.setPositionAsOrigin( camera.position )
}
// console.log(renderer.vr)
addSingleFunctionToPanel(setCurrentHeadPositionAsCenter,6.05,5.38)
setCurrentHeadPositionAsCenter() //wanna be accessible from behind the panel?
let vrButton = WEBVR.createButton( renderer )
document.body.appendChild( vrButton );
document.addEventListener( 'keydown', function( event )
{
if(event.keyCode === 69 )
{
vrButton.onclick()
window.removeEventListener('resize', windowResize)
}
}, false );
socket.onopen = function()
{
initFileNavigator()
//maybe better if they were all cubes? Atoms are spheres.
//coot specific
// initRefiner()
// initAutoRotamer()
// initEnvironmentDistances()
initRigidSphereMover()
// initRigidChainMover()
initProteinPainter()
initAtomLabeller()
// initMutator()
initAtomDeleter()
initResidueDeleter()
// initNewAtomRoster()
// initRamachandran()
socket.send(JSON.stringify({command:"loadPolarAndAzimuthals"}))
let loopCallString = getStandardFunctionCallString(loop);
renderer.setAnimationLoop( function()
{
eval(loopCallString);
renderer.render( scene, camera );
} )
}
}