Catalog npm
Back to packageRELEASE DETAILS

1.5.3

npm

3dmol

Object oriented Javascript molecular visualization library

Published8 Jul 2020
Direct dependencies17
Transitive dependenciesNot calculated

README

Current package documentation

3Dmol.js

CDNJS codecov Github CI

3Dmol.js is an object-oriented, WebGL accelerated JavaScript library for online molecular visualization.

Since 3Dmol.js is licensed under the permissive BSD open-source license, you are free to use it in any project, as long the code is properly acknowledged and cited.

With 3Dmol.js, you can add beautifully rendered molecular visualizations to your web applications. Features include:

  • support for pdb, sdf, mol2, xyz, cif, cdjson, mmtf, prmtop, gro, pqr, cube, and vasp formats
  • parallelized molecular surface computation
  • sphere, stick, line, cross, cartoon, and surface styles
  • atom property based selection and styling
  • labels
  • clickable interactivity with molecular data
  • geometric shapes including spheres and arrows

See the documentation to learn how to use 3Dmol.js as a hosted viewer, embeddable viewer, or as a component of a larger application.

Examples

HTML

<script src="https://3Dmol.org/build/3Dmol-min.js"></script>     
 
 <div style="width: 400px; height: 400px;" 
        class='viewer_3Dmoljs' data-pdb='4N8T' data-style='cartoon:color=spectrum'
        data-surface='opacity:.7;color:white'></div>

JavaScript

We support the use of both PDB queries as well as PDB files.

Alt Text

First you simply create the viewer with a div's id.

var viewer = $3Dmol.createViewer($("#div"));

Then you can download a protein data bank model (here pdb:1MO8) and display it with the styling of your choosing.

$3Dmol.download("pdb:1MO8",viewer,{multimodel:true, frames:true},function(){
	viewer.setStyle({}, {cartoon:{color:"spectrum"}});
	viewer.render();
});

Surfaces

We also support the use of surfaces that are asynchronously loaded and support different color schemes

Alt Text

viewer.addSurface($3Dmol.SurfaceType.VDW, {
    opacity:0.85,
    voldata: new $3Dmol.VolumeData(volumedata, "cube"),
    volscheme: new $3Dmol.Gradient.ROYGB(range[1],range[0])
},{});

Shapes

The use of different shapes and styles is supported.

Alt Text

viewer.addCylinder({start:{x:0.0,y:2.0,z:0.0},
    end:{x:0.0,y:10.0,z:0.0},
    radius:0.5,
    fromCap:false,
    toCap:true,
    color:'teal'});
viewer.addCylinder({start:{x:15.0,y:0.0,z:0.0},
    end:{x:20.0,y:0.0,z:0.0},
    radius:1.0,
    color:'black',
    fromCap:false,
    toCap:false});

Documentation

Please check out our documentation at 3dmol.js. We have tutorials, as well as the stable release of the platform.

Contact

Please address any questions or concerns to dkoes@pitt.edu. You may also submit an issue on github.

Citing

If you use 3Dmol.js, please cite our Bioinformatics paper.

Funding

3DMol.js is funded through R35GM140753 (and previously R01GM108340) from the National Institute of General Medical Sciences. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute of General Medical Sciences or the National Institutes of Health.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 17

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pako
Environment
{
  "local_name": "pako",
  "alias": false,
  "peer_metadata": null
}
^1.0.11runtime
jquery
Environment
{
  "local_name": "jquery",
  "alias": false,
  "peer_metadata": null
}
^3.5.0runtime
gulp-cli
Environment
{
  "local_name": "gulp-cli",
  "alias": false,
  "peer_metadata": null
}
^2.2.0runtime
netcdfjs
Environment
{
  "local_name": "netcdfjs",
  "alias": false,
  "peer_metadata": null
}
^1.0.0runtime
del
Environment
{
  "local_name": "del",
  "alias": false,
  "peer_metadata": null
}
^5.0.0development
gulp
Environment
{
  "local_name": "gulp",
  "alias": false,
  "peer_metadata": null
}
^4.0.2development
jsdoc
Environment
{
  "local_name": "jsdoc",
  "alias": false,
  "peer_metadata": null
}
^3.6.4development
jshint
Environment
{
  "local_name": "jshint",
  "alias": false,
  "peer_metadata": null
}
^2.10.2development
gulp-clean
Environment
{
  "local_name": "gulp-clean",
  "alias": false,
  "peer_metadata": null
}
^0.4.0development
gulp-merge
Environment
{
  "local_name": "gulp-merge",
  "alias": false,
  "peer_metadata": null
}
^0.1.1development
gulp-shell
Environment
{
  "local_name": "gulp-shell",
  "alias": false,
  "peer_metadata": null
}
^0.7.1development
gulp-concat
Environment
{
  "local_name": "gulp-concat",
  "alias": false,
  "peer_metadata": null
}
^2.6.1development
gulp-jsdoc3
Environment
{
  "local_name": "gulp-jsdoc3",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
gulp-jshint
Environment
{
  "local_name": "gulp-jshint",
  "alias": false,
  "peer_metadata": null
}
^2.1.0development
gulp-rename
Environment
{
  "local_name": "gulp-rename",
  "alias": false,
  "peer_metadata": null
}
^1.4.0development
gulp-terser
Environment
{
  "local_name": "gulp-terser",
  "alias": false,
  "peer_metadata": null
}
^1.2.0development
gulp-uglify
Environment
{
  "local_name": "gulp-uglify",
  "alias": false,
  "peer_metadata": null
}
^3.0.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "3a31b02edba2462b98d9a22d921dcdeea386d573",
  "tarball": "https://registry.npmjs.org/3dmol/-/3dmol-1.5.3.tgz",
  "fileCount": 231,
  "integrity": "sha512-fuSIFEDjr4JXnsJKsUxn4N9MZssSe/U2iscL4U7JMJM72HM3ZW7oo1h+Rlv/ZfLjnw2lIef8bAih+fX3/L698w==",
  "signatures": [
    {
      "sig": "MEQCIBGynPh/gnuadr6kDDiXgfUeXpwYyTBNxpha3zFRZBgZAiBcS3YyOnaevi6TMM3bWMrtSfHB8F8DlObQr8GhNtJXeg==",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 151538859,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBSCpCRA9TVsSAnZWagAAod0P/ib4utyDLbsOkRSGg1T9\nTvBlxv86uKeuTGk6r8q3NW1TZQgmmlvu0vd5M/Ii7fnE3KnNpRKnEAoHDM21\nbRmebqhmByhYX4mGpDrApHwHBI/ez5ANLvK7eOdCO54/Doo1i3b+LCRJKdnd\nSGdtkWv3SOLZGYGcwNkM5IkcvSfQNF/GtMVyJ5PrQQFimhoKrd2Wn1qUVDUf\nVXNet+tEP2I7H9x2yczWH2sUogjBXHUFLIvRnBmLJ4VmJ2z1bF+0m8negopN\n8mtXGdTyAJLFiAu19gttG64Nn0eAyymmhNpxGfMDEslLm+/M/ER8WkzluAiU\nk+rTL3B4zaeBv3oqgJYadAh7vHhjTbiOEFKSRfCJabA9J+D3iuuZZOKhEGw1\nEM2Ne+Hhwg3NRgTMJ9PdXz+/+cywejRyyzaqCFEYnnUH67hWLCz8fm5VvQjV\nuznpaguN/lyKIcp4riGpZbdg2piFcLDJalkQ4rHNQldxlOowoFtxuz4fybIJ\nb06PRX3InSTNqLAW40TyAAvmrCHbhX4/KdXnwLShsFc2JJFu3DTAbx28OFoj\nKc2GpxZ3+K2C+iqq1frcYxq0tvbIDC1g0MFhAbrudh1Sd81RTSHi/6PSJRr6\nh4Uags64sU8i7wBKlEWDsnrqRxFG7tJCvgwdJgi4mp7h3Q/NvxoEEDp/9ntA\nq7Zu\r\n=qooX\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
3dmol/3dmol.js

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
dkoes/3dmol.js

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:1978b10774f50fab88bc3eca72a7fec4594040cc9ec1877462bca7e09ebe2ae1

Other collected versions

2.5.522 May2.5.422 Jan2.5.327 Sept2.5.230 Jul2.5.126 Jun2.5.03 JunView all collected versions →