[ase-users] x3d format
Oscar Xavier Guerrero
oscarxavier.ox at gmail.com
Sat Oct 7 10:40:17 CEST 2017
Hello,
I have some suggestions for the 3D io modules. I still haven't gotten
around to figuring git so I don't know how to submit my modifications.
I'd like to add support for the VRML 2.0. Also, for the X3D object in
ase/io/x3d.py, as of now it uses a Sphere for every atom. I think it would
be better (for the file size and readability) to use a PROTO to define the
Sphere of every element that will be used and name it like the chemical
element, it would only take the position as an argument. That way you would
have the radius and color information written just once at the star of the
file, then calling those definitions by their chemical name and their
position and maybe a comment to add info info about that atom (like its
index).
Something like the X3D equivalent to this VRML PROTO
PROTO {element} [ exposedField SFFVec3f xyz 0 0 0 ] {{
Transform {{
translation IS xyz
children [
Shape {{
appearance Appearance {{ material Material {{
diffuseColor {color} }} }}
geometry Sphere {{ radius {radius} }}
}}
]
}}
}}
{element} { xyz {x} {y} {z} } # {other_info}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20171007/18507128/attachment.html>
More information about the ase-users
mailing list