{"action":"created","issue":{"url":"https://api.github.com/repos/eppic-team/eppic/issues/94","repository_url":"https://api.github.com/repos/eppic-team/eppic","labels_url":"https://api.github.com/repos/eppic-team/eppic/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/eppic-team/eppic/issues/94/comments","events_url":"https://api.github.com/repos/eppic-team/eppic/issues/94/events","html_url":"https://github.com/eppic-team/eppic/issues/94","id":138922684,"number":94,"title":"Port LatticeGraph to run on NGL","user":{"login":"sbliven","id":595872,"avatar_url":"https://avatars.githubusercontent.com/u/595872?v=3","gravatar_id":"","url":"https://api.github.com/users/sbliven","html_url":"https://github.com/sbliven","followers_url":"https://api.github.com/users/sbliven/followers","following_url":"https://api.github.com/users/sbliven/following{/other_user}","gists_url":"https://api.github.com/users/sbliven/gists{/gist_id}","starred_url":"https://api.github.com/users/sbliven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbliven/subscriptions","organizations_url":"https://api.github.com/users/sbliven/orgs","repos_url":"https://api.github.com/users/sbliven/repos","events_url":"https://api.github.com/users/sbliven/events{/privacy}","received_events_url":"https://api.github.com/users/sbliven/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eppic-team/eppic/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"altheaparker","id":1837903,"avatar_url":"https://avatars.githubusercontent.com/u/1837903?v=3","gravatar_id":"","url":"https://api.github.com/users/altheaparker","html_url":"https://github.com/altheaparker","followers_url":"https://api.github.com/users/altheaparker/followers","following_url":"https://api.github.com/users/altheaparker/following{/other_user}","gists_url":"https://api.github.com/users/altheaparker/gists{/gist_id}","starred_url":"https://api.github.com/users/altheaparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altheaparker/subscriptions","organizations_url":"https://api.github.com/users/altheaparker/orgs","repos_url":"https://api.github.com/users/altheaparker/repos","events_url":"https://api.github.com/users/altheaparker/events{/privacy}","received_events_url":"https://api.github.com/users/altheaparker/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/eppic-team/eppic/milestones/1","html_url":"https://github.com/eppic-team/eppic/milestones/3.0","labels_url":"https://api.github.com/repos/eppic-team/eppic/milestones/1/labels","id":956628,"number":1,"title":"3.0","description":"Version 3.0 fully based on Biojava. Should be able to do assemblies and symmetry assessment.","creator":{"login":"josemduarte","id":6000474,"avatar_url":"https://avatars.githubusercontent.com/u/6000474?v=3","gravatar_id":"","url":"https://api.github.com/users/josemduarte","html_url":"https://github.com/josemduarte","followers_url":"https://api.github.com/users/josemduarte/followers","following_url":"https://api.github.com/users/josemduarte/following{/other_user}","gists_url":"https://api.github.com/users/josemduarte/gists{/gist_id}","starred_url":"https://api.github.com/users/josemduarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josemduarte/subscriptions","organizations_url":"https://api.github.com/users/josemduarte/orgs","repos_url":"https://api.github.com/users/josemduarte/repos","events_url":"https://api.github.com/users/josemduarte/events{/privacy}","received_events_url":"https://api.github.com/users/josemduarte/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":22,"state":"open","created_at":"2015-01-29T11:46:01Z","updated_at":"2016-03-14T22:47:03Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-03-07T08:52:11Z","updated_at":"2016-03-16T00:47:03Z","closed_at":null,"body":"We should add an [NGL](https://github.com/arose/ngl) version of LatticeGUI.\r\n\r\n- Look at the HTML generated by LatticeGUI3Dmol and determine the equivalent commands in NGL\r\n- Create a mustache template for NGL\r\n- Create eppic.assembly.gui.LatticeGUINGO.java in eppic-cli to generate test html pages from the template\r\n\r\nAfter that we can start taking advantage of some of NGL's unique features, such as generating the unit cell contents from operators rather than reading a large CIF file."},"comment":{"url":"https://api.github.com/repos/eppic-team/eppic/issues/comments/197088090","html_url":"https://github.com/eppic-team/eppic/issues/94#issuecomment-197088090","issue_url":"https://api.github.com/repos/eppic-team/eppic/issues/94","id":197088090,"user":{"login":"josemduarte","id":6000474,"avatar_url":"https://avatars.githubusercontent.com/u/6000474?v=3","gravatar_id":"","url":"https://api.github.com/users/josemduarte","html_url":"https://github.com/josemduarte","followers_url":"https://api.github.com/users/josemduarte/followers","following_url":"https://api.github.com/users/josemduarte/following{/other_user}","gists_url":"https://api.github.com/users/josemduarte/gists{/gist_id}","starred_url":"https://api.github.com/users/josemduarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josemduarte/subscriptions","organizations_url":"https://api.github.com/users/josemduarte/orgs","repos_url":"https://api.github.com/users/josemduarte/repos","events_url":"https://api.github.com/users/josemduarte/events{/privacy}","received_events_url":"https://api.github.com/users/josemduarte/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T00:47:03Z","updated_at":"2016-03-16T00:47:03Z","body":"After talking to @arose, he has provided some tips on how to represent the spheres and cylinders needed for the graph view. This is the snippet of code from him, drawing 2 nodes and an edge connecting them:\r\n\r\n```javascript\r\n            var sphereBuffer = new NGL.SphereBuffer(\r\n                new Float32Array( [ 0, 0, 0, 6, 0, 0 ] ),  // position (xyz)\r\n                new Float32Array( [ 1, 0, 0, 1, 1, 0 ] ),  // color (rgb)\r\n                new Float32Array( [ 1, 1 ] )  // radius\r\n            );\r\n            var sp = o.addBufferRepresentation( sphereBuffer );\r\n            sp.setParameters( { opacity: 0.5 } );\r\n\r\n            var cylinderBuffer = new NGL.CylinderBuffer(\r\n                new Float32Array( [ 0, 0, 0 ] ),  // from position (xyz)\r\n                new Float32Array( [ 6, 0, 0 ] ),  // to position (xyz)\r\n                new Float32Array( [ 1, 0, 0 ] ),  // from color (rgb)\r\n                new Float32Array( [ 1, 1, 0 ] ),  // to color (rgb)\r\n                new Float32Array( [ 0.5 ] )  // radius\r\n            );\r\n            o.addBufferRepresentation( cylinderBuffer );\r\n```\r\n\r\nMore than 1 position or color can be specified in the arrays (for instance there's 2 spheres specified in NGL.sphereBuffer above).\r\n\r\nOther more complicated objects could be created with `MeshBuffer`.\r\n\r\nThis is using the very same API used for representing atoms and bonds. The functions are defined in [this file](https://github.com/arose/ngl/blob/master/js/ngl/buffer.js). Thanks so much @arose for all the tips!"}}