Thingiverse
Buckyballs - Molecular Models
door pmoews
594
Downloads
719
Likes
12
Makes
Here's a simple molecular modeling program written in OPENscad. It's a derivative of the OPENscad program in "Protein Models". It contains two modules, "atom" and "bond". A call to atom makes a sphere and a call to bond makes a cylinder. Atom requires a radius and a set of atomic coordinates; bond requires two sets of atomic coordinates. For example to make a water molecule we could write:
atom (.3, 0, 0, 0); // an Oxygen at the origin, .3 for its radius
atom (.25, -.96, 0, 0); // for the first H atom, .25 for its radius
atom (.25, .24, .93, 0); // for the second H atom
bond (0,0,0,-.96,0,0); // for the first O-H bond
bond (0,0,0,.24,.93.0); // for the second o-H bond
To render it all together the above commands are included within a union statement. More details in makewater.scad.
Once I had this program I began looking for coordinates of interesting molecules to print. I found a collection of fullerenes at http://www.ccl.net/cca/data/fullerenes/i
atom (.3, 0, 0, 0); // an Oxygen at the origin, .3 for its radius
atom (.25, -.96, 0, 0); // for the first H atom, .25 for its radius
atom (.25, .24, .93, 0); // for the second H atom
bond (0,0,0,-.96,0,0); // for the first O-H bond
bond (0,0,0,.24,.93.0); // for the second o-H bond
To render it all together the above commands are included within a union statement. More details in makewater.scad.
Once I had this program I began looking for coordinates of interesting molecules to print. I found a collection of fullerenes at http://www.ccl.net/cca/data/fullerenes/i
Heb je dit model geprint? Inloggen en deel je make!
Log in om een reactie achter te laten
InloggenNog geen reacties – wees de eerste!