Comments (13)
Ooh, that would be lovely. I would think you could piggy-back on the symmetry support.
from 3dmol.js.
I think the symmetry support does most of what you want. It will grab the BIOMT records out of a pdb. cif support is still a work in progress, but it will work similarly.
By default we don't show the symmetric units (you have to pass the doAssembly option). I've enabled this option in the example page:
http://3dmol.csb.pitt.edu/tests/example.html
If you go there and download 2POR you'll see the full assembly.
Symmetric units are efficiently rendered - the geometry is not recalculated, just redrawn with a different transform. This means you can't uniquely style the individual units. However, with the get and set symmetry functions you can specify which symmetries belong to which model (for example, if you want to style a single subunit one way and all the others another way).
We're still working on both symmetry support (surfaces don't do the right thing yet) and cif support. I'm assigning this to the two students who are doing this so they know someone is interested.
Let us know if there are other ways you want to interact with this sort of data.
from 3dmol.js.
Have you thought about hosting an openbabel HTTP server and running conversions through that until you build up js support?
Regarding crystals, a unit cell box is an easy-to-add feature with substantial benefit. It's 30-ish lines with three.js and jquery, and should be translatable to your codebase.
Regarding other feature requests, I have a closed-source UI that has some useful crystal functionality. I've been meaning to wrap it up into a FOSS project, but haven't had the time. If you want, I could explain some of those features + pseudocode and then @jlc206 and @Jus1in can decide if any are worth pursuing.
from 3dmol.js.
The GLViewer class now has an addUnitCell function. If a model has unit cell data (e.g., from a pdb file) this will return a GLShape object with the box defined as line shapes.
What is CIF unpacking?
from 3dmol.js.
CIF unpacking = processing symmetries. processSymmetries
looks like it does this already.
from 3dmol.js.
So like this: http://3dmol.csb.pitt.edu/tests/testsym.html
I think we'll also add support for generating the symmetry axes and then close this issue, unless there are other desirable features.
from 3dmol.js.
That's exactly it.
Have you tried running your mmCIF parser against structures in the CCDC? It'll stress test your parser, but, if it works, I think you could declare 3dmol.js crystal friendly.
from 3dmol.js.
The CCDC isn't exactly open or accessible. I can't even figure out how to download the small teaching subset, which seems like it would be ideal for surveying a diverse set of structures.
A random sample from the Crystallography Open Database might do the trick. We've been mostly focused on PDB cifs - examining small molecules cifs is definitely a good idea.
from 3dmol.js.
Agreed that it's a mess (just like CIFs). Here's a download link.
wget https://downloads.ccdc.cam.ac.uk/supplementary_materials/teaching_subset_cifs.tgz
Errors I usually see in parsers are:
- Handling non-rectangular unit cells
- Handling multiple conformations in one file
- Collision / spacegroup detection to fix malformed files (optional)
The CCDC is a messy database (maybe the teaching subset is different?). Hopefully it'll be useful in stress testing the parser.
from 3dmol.js.
I have gone through many of the CIFs in the teaching subset and fixed many issues. The only one that I've found that still doesn't work is CHOLES20, explained in #102. I made sure to handle non rectangular unit cells correctly (22a7a5e). Could you explain what you mean by multiple conformations in one file?
I then added crystal symmetry support (22298ee). This converts all of the crystal symmetries into transformations, which are then rendered when passed the doAssembly=true
option is passed. At the moment, any reflected symmetries will appear as black, as all of the normals are flipped inward, but reflections shouldn't happen often. If this is ever an issue pass the duplicateAssemblyAtoms=true
option. It is slower, but should render correctly.
It looks like the crystal symmetry support commit has not been pushed to the website yet. Once it is, see if it works for you.
from 3dmol.js.
I've updated the website (git is always the most up to date version). Multiconformer support is what Jasmine is working on. I don't know what this looks like in cifs. For most file formats you just concatenate together single conformer files.
from 3dmol.js.
It's basically the same in cifs. Their key-value notation is sometimes used to mash together different structures, different conformers, etc. into one file. I just asked some colleagues to send me CIFs with conformers that don't parse well. Here's a good example.
I'd say additional work here is nice to have, but not necessary. The drawer works on >90% of my cifs, so it's definitely usable. This extra conformer business can be handled externally when it pops up.
from 3dmol.js.
I finally fixed the issue where reflected transformations would render black. Are there any other issues with crystal symmetry support, or can this issue be closed?
from 3dmol.js.
Related Issues (20)
- Is it possible to have post-translational modifications (PTMs) features in 3Dmol? HOT 1
- Discrepancy in Atom Rendering Between 3Dmol.js and VESTA for Al1Cd2_H.cif File HOT 4
- .render() is not showing updated representation of models HOT 2
- [BUG] defaultcolors not applied when using addModelsAsFrames HOT 1
- py3Dmol is not working [BUG] HOT 4
- [BUG] Double bonds rendered out of plane (CID: 243, 2244) HOT 2
- Support wireframe and opacity for addIsoSurface in VRML Export HOT 2
- [BUG] Crystal supercell displays in a very weird way HOT 10
- Enable Model Translation on Right-Click and Mouse Movement. HOT 3
- Can't select properly, nor generate cartoon & multiple structures HOT 9
- Assign Property to selection, select and colour by property HOT 2
- View multiple models with absolute positions (i.e. no centering) HOT 8
- Stick representation for IONS HOT 2
- [BUG] WRONG BONDS BEING DRAWN HOT 8
- Opening MANY models efficiently HOT 3
- PRMTOP needs to parse residue names
- Highlighting specific residues HOT 7
- use less CPU for animations HOT 3
- Dinamic protein visualization HOT 1
- How to use native in React Js and Next Js 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3dmol.js.