Skip to content

Archive Trac docs ngl

madscatt edited this page Jun 20, 2026 · 1 revision

Docs Ngl

Legacy Trac archive page imported from docs_ngl. Source: https://genapp.rocks/wiki/wiki/docs_ngl. Active canonical page: Reference-NGL. Review age, links, and examples before treating as current.

NGL molecular viewer

  • requires genappalpha rev XXXX

  • NGL provides a WebGL based molecular viewer

  • examples

    • ngltest1.png
    • module json (note height & width must be specified, else the viewer will have no size):
     ...
     ,{
            "role"            : "output"
            ,"id"              : "nglplot"
            ,"label"           : "Example NGL"
            ,"type"            : "ngl"
            ,"height"          : "500px"
            ,"width"           : "600px"
      }
      ...
  • executable JSON output
{
    "loadname"    : "myfile.pdb"
    ,"loadparams" : {
                       "ext" : "pdb"
                       ,"name" : "a name"
                       ,"asTrajectory" : true
                    }
    ,"representation" : "cartoon"

}
  • notes:
    • Required:
    • "loadname" is passed to stage.loadFile()
    • Optional:
    • "loadparams" is passed as the 2nd argument to stage.loadFile()
      • "loadparams" : "ext" is an optional file extension to determine file type (if not specified in "loadname").
      • "loadparams" : "name" is an optional name for the data
      • "loadparams" : "asTrajectory" is optional, but required for multimodel PDB's to be used as trajectories
    • "representation" is an optional startup representation
      • default "cartoon"
      • possibilities:
    backbone
    ball+stick
    cartoon
    contact
    helixorient
    hyperball
    label
    licorice
    line
    point
    ribbon
    rocket
    rope
    spacefill
    surface
    trace
    tube
  • TO DO:
    • add trajectory controls

Clone this wiki locally