Giter Club home page Giter Club logo

3dmol.js's People

Contributors

adithyaakrishna avatar angel4577 avatar bassemhermina avatar camilacanhete avatar danielholmes avatar dependabot[bot] avatar dkoes avatar donbyron02 avatar dxdc avatar foowhiz avatar helblazer811 avatar jaxmatrix avatar jlc206 avatar joeskinov avatar justinmc avatar k7s3 avatar luc1100 avatar luthaf avatar manohar-94 avatar mattragoza avatar mkhorton avatar nicolascarpi avatar nrego avatar prajwalkulkarni avatar racingtadpole avatar ryanguild avatar sbliven avatar sillitoe avatar sky1e avatar tjakubiec218 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3dmol.js's Issues

Background Alpha Not Working

The alpha value doesn't change the background color with setBackgroundColor. I am trying to make the viewer completely transparent but it doesn't seem to change regardless of the alpha value. The color does change but not the transparency.

viewer.setBackgroundColor(0x0d0ddd, 0);
viewer.render();

Is there an option to set the alpha value through a data attribute?

Support expand and within selector keywords

These can be used to efficiently expand a provided solution to all atoms within a specified distance. Expand is basic expansion. Within takes a selection object and distance and then the result can be combined with the rest of a selection object. Will work nicely with byres.

Matt is working on this.

addIsoSurface framework opacity doesn't work

viewer.addIsosurface(voldata, {isoval: -0.01, color: "red", alpha: 0.95, smoothness: 5,
opacity:1.0, wireframe:true,linewidth:0.1,clickable:true, callback:
function() {
this.opacity = 1.;
viewer.render();
}});

Problem reading mmCIF file

I've read in some old issues that mmCIF support is implemented already into 3dmol.js. Is that right?

I wanted to try a very simple case with a file downloaded straight from the PDB (PDB id 1smt). This is what I do:

<html>

<head>
 <script src="http://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script> 
</head>

<div style="height: 800px; width: 800px; position: relative;" class='viewer_3Dmoljs' data-href='1smt.cif'>
</div>

</html>

I only get an empty page and this in the js console:

Uncaught TypeError: Cannot read property 'id' of undefined (3Dmol-min.js:529)

I've also tried removing all headers from the mmCIF file and keeping only the _atom_site lines, but the error is the same. Also if I specify the file format as data-type='cif' the error is the same.

Any ideas what am I doing wrong?

Thanks by the way for such a great piece of software :)

Crystal support?

Hi,

I was recently forwarded a link to this project - it looks great! I work with crystals, and I was wondering if there are any plans to support unit cell drawing or CIF unpacking.

If this isn't on the priority list, I could try implementing it myself and sending over a PR (likely on an upcoming slow Sunday). Let me know either way!

Add GLViewer.addLine()

I'd like to draw a line between two atoms.

I'm currently using viewer.addCylinder, with a radius of 0.05.

I'd like to have a command like addLine (perhaps even allowing dotted lines...?).

Implement efficient display of symmetric assemblies

As long as we don't mind applying exactly the same style to each subunit, this can be done very efficiently by just applying a transformation matrix. Probably would be nice to have an API that let the user turn the implicit assembly into an explicit model too.

addIsoSurface callback doesn't work

viewer.addIsosurface(voldata, {isoval: -0.01, color: "red", alpha: 0.95, smoothness: 5,
opacity:1.0, wireframe:true,linewidth:0.1,clickable:true, callback:
function() {
this.opacity = 1.;
viewer.render();
}});

jquery dependency

It seems that jquery is used only in few places to load pdf from a server and read data attributes.
Will you consider removing the jquery dependency and use plain javascript?

I also think that 3Dmol is easier to remember than $3Dmol for the API.

Offer CDN usage through JSDelivr

http://www.jsdelivr.com is a free versioned CDN for GitHub hosted (and other) JS libraries, CSS, etc. To add resources, you create a pull request at GitHub and ideally add an update.json file, e.g.

{
"packageManager": "github",
"name": "morris.js",
"repo": "morrisjs/morris.js",
"files": {
"include": ["morris.css", "morris.js", "morris.min.js"]
}
}

At that point, when 3Dmol.js releases are tagged on GitHub, JSDelivr will auto-update.

It seems natural to offer releases of 3Dmol.js through the service for distributed world-wide use.

Different display with Mol2 and SDF

When we use 3DMol for the same file in either Mol2 or SDF format, we see two very different geometries. Also, with Mol2 files, hydrogens aren't shown, but they are with SDF.
https://gist.github.com/ghutchis/4243c0242423770d58a3

  1. Is it possible to make showing explicit hydrogens a setting (i.e., so it can be the default for us even with Mol2 files)?
  2. Why is the geometry so different with Mol2 - the Cartesian coordinates are the same and Open Babel generates the same InChI as far as I can tell..

support imposters

As far as I can tell, no browsers properly support gl_fragdepth at the moment, although some lie about it. But once they do..

Hexadecimal color codes not working

From some commits to now, it seems that hexadecimal color codes are not working anymore when using them in selections:

<html>

<head>
<script src="http://3Dmol.csb.pitt.edu/build/3Dmol.js"></script>
</head>

<div style="height: 800px; width: 800px; position: relative;" class='viewer_3Dmoljs' 
 data-href='1smt.pdb' 
 data-backgroundcolor='0xffffff'
 data-select1='chain:A' data-style1='cartoon:color=0x00ff00'  
 data-select2='chain:B' data-style2='cartoon:color=0x00ffff'
> 
</div>

</html>

What I get now is both chains colored in black, whilst that kind of thing used to work a few commits ago. If I specify color strings like 'red' or 'cyan' everything works fine.

addStyle behavior

addStyle seems to add style to the invert of the selection, not the selection itself

Spectrum coloring based on b-factors

If I understand it, the current spectrum coloring will color things based on residue or atom indices. For instance I can see that applying spectrum on a chain, I get an n-terminal to c-terminal spectrum.

It would be really cool to have the pymol-like feature, where spectrum can use the b-factors for the coloring. In fact the spectrum command in pymol can do quite a lot of things, all of those could be really useful.

Another very nice feature would be that spectrum worked also in surface representation (it looks like that's already in issue #79 ). Spectrum on b-factors (temperature factors or whatever property is actually written in the b-factors column) is especially useful in surface representation.

Extract partial charges from Mol2 files

Most mol2 files include atomic partial charges. It would be awesome to use the potentials defined by the file rather than residue-based charges, e.g.:

  1 O          -3.9862   -0.0915   -0.4753 O.2     1  UNL11111   -0.4322
  2 C          -3.1086   -0.7606    0.0104 C.2     1  UNL11111    0.3255
  3 C          -1.9542   -0.0724    0.7328 C.3     1  UNL11111   -0.0217
  4 H          -2.0091   -0.2416    1.8344 H       1  UNL11111    0.1622
  5 O          -2.0231    1.3296    0.5822 O.3     1  UNL11111   -0.5655

The last column is always the partial charge. Open Babel's parser looks like this:

   sscanf(buffer," %*s %1024s %lf %lf %lf %1024s %d %1024s %lf",
           atmid, &x,&y,&z, temp_type, &resnum, resname, &pcharge);

This would imply that there's always(?) a token[8] entry with the floating-point partial charge.

transparent cartoons

add support for opacity property of cartoons

Note that transparent objects are not transparent to each other.

better zoomto

Make zoomTo smarter - create a PCA aligned bounding box around the selection and fit the bounding box to the window (first two components match the longest and second longest dimensions). Choose the orientation where the orientation is most visible.

CORS issue downloading PDB models

I get the following error message trying to download pdb id '1TUP':
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.