| Converting crystal structures to printable files [message #46869] Thu, 12 April 2012 17:39 UTC |
 |
|
I work with crystals at my job (think diamonds, rubies, etc. but nothing so expensive) and I use a software known as Diamond crystal structure visualization which generates 3D renderings of the atomic arrangements of the atoms in crystal structures. It has all of the xyz coordinate data to produce 3D design files that would be printable, but it isn't formatted to save in any file type that is recognizable by typical design software (SketchUp, MeshLab, netfabb, etc.) If anyone has any ideas about how to go about importing this data, I would greatly appreciate it. I know I could just sit down and put in each atom by hand as spheres and connect them all with tapers, but the scale I want to use would take forever and if I already have the xyz data, I would rather just use that. The Diamond software is available as a demo download on their website, so if someone has the time (and inclination to help), you can download it and see for yourself.
Thanks in advance.
ChemDr
|
|
|
| Re: Converting crystal structures to printable files [message #46873 is a reply to message #46869 ] Thu, 12 April 2012 18:15 UTC |
  |
|
Can you share a copy of such a file? Either publicly or thru PM would be fine.
Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
|
|
|
| Re: Converting crystal structures to printable files [message #46884 is a reply to message #46869 ] Thu, 12 April 2012 19:36 UTC |
  |
|
Try http://www.crystalimpact.com/diamond/faq.htm#vrml export
VRML2.0(97) a .wrl file is one of the filetypes Shapeways accepts. If Diamond outputs the VRML1.0 filetype, use Meshlab or NetFabb Basic to convert to whichever filetype you want to upload.
From Shapeways FAQ;
"You can upload STL, VRML2/97 (.wrl), COLLADA (.dae), X3D and OBJ files to Shapeways. Many modeling applications support these file formats. If you need to convert to them we recommend Accutrans or Meshlab."
If you don't need colour in the print, I recommend using NetFabb both for conversion (to stl) and error checking.
Paul
|
|
|
| Re: Converting crystal structures to printable files [message #46898 is a reply to message #46884 ] Thu, 12 April 2012 22:20 UTC |
  |
|
chemdr99 and I are exchanging PM's about this... it seems the WRL witten out by "Diamond" is not directly compatible with Meshlab. I was able to get it to load into Truespace, and flip it to VRML2.0, but that's a kludgy way of dealing with it.
I'll post more as we figure out something.
Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
|
|
|
| Re: Converting crystal structures to printable files [message #46945 is a reply to message #46898 ] Fri, 13 April 2012 14:34 UTC |
  |
|
If you have the coordinates of each atom, and a list of the edges to be drawn between atoms, then in principle it shouldn't be too hard to write a script to build the geometry from that data. I would use Rhino and the Python scripting interface.
You might find that the meshes used to visualise the geometry aren't watertight, or aren't very high resolution (e.g. tubes have only a small number of sides, when you'd prefer them to be rounder). Both of these issues aren't a problem for just drawing things on screen, the latter particularly when they lack of roundness can be hidden using shading.
So it might be better to rebuild from scratch, which also lets you play with the relative thickness of lines and size of balls around the atoms etc.
|
|
|
| Re: Converting crystal structures to printable files [message #46946 is a reply to message #46945 ] Fri, 13 April 2012 15:04 UTC |
  |
|
Do that, find surface atoms, assume atoms are mesh vertices, iteratively split any nontriangular surface facets, then write to ASCII STL. Should work, plus or minus some debugging. From there, go back and fiddle with vertex choice and initial facet choice to tweak the results if needed.
Alternately, output atoms as point clouds and try to fit a mesh in MeshLab (etc.). Less work, but probably less ideal results.
|
|
|
|
| Re: Converting crystal structures to printable files [message #46952 is a reply to message #46949 ] Fri, 13 April 2012 17:36 UTC |
  |
|
Thanks to Stony, I have a sufficiently efficient workflow from crystal data (.cif) to printable .stl file. Probably due to the use of all-free programs, I have to go through a few programs, but it is well worth the few extra mouse clicks.
I start with the .cif crystal data file I open with Diamond (manipulation of the data in Diamond is a whole other message and something you can probably follow better from a tutorial website) and export as .wrl.
In Notepad, I manually increase the radii of the cylinders (atomic bonds) and spheres (atoms) to a more manageable size (right now using 0.15 as cylinder size and 0.5 as atom size - this could also probably be done in Diamond).
Then, open the edited .wrl file in AccuTrans 3D and export as an .x3d file.
This file is opened in Meshlab and resaved as .stl,
Finally, this .stl file is opened in netfabb where all scaling and error correction are performed and the final file is exported as an .stl file.
And there you have it. I find it efficient enough to get the desired results and you can see the fruits of much labor in my store.
www.shapeways.com/shops/thedoor
Thanks again to all for your help and suggestions and especially to Stony for the workflow and AccuTrans3D suggestion. God has really shown Himself in my once-reserved world of chemistry through these crystal structures and I am glad to finally be able to share them with everyone else. He shows up in the large places as well as the very tiny (nano-scale even) and even in a community of strangers connected by a common bond of creativity.
ChemDr
|
|
|
| Re: Converting crystal structures to printable files [message #46953 is a reply to message #46952 ] Fri, 13 April 2012 17:37 UTC |
 |
|
Stony - speaking of printing atoms, you would be surprised what kind of research goes on in academia. I know of a group that is building organs one cell at a time . Not quite atomic, but getting there
ChemDr
|
|
|