Asy-Atoms
An asymptote package for rendering atomic structures
Asy-Atoms Documentation

ASY-ATOMS

This package is a tool in order to render molecular structures in using the Asymptote program.

Installation

Take the files in the dist director and copy them in your project directory or if you want to install it system-wide just copy the files into

Linux

/usr/share/asymptote/

Windows

TODO

Quick start

import atoms;
unitsize(1cm);
currentprojection = perspective(1,1,1);
settings.prc = false;
settings.render = 10; //quality
settings.outformat = "png"; //output
real bond_radius = 3.0;
real radius_scale = 0.2;
Atom h_1 = Atom("H", (-1,0,0));
Atom h_2 = Atom("H", (1,0,0));
h_1.color = red;
h_2.color = blue;
h_1.draw(true);
h_2.draw(true);
Bond(h_1,h_2).draw(radius=bond_radius);

And now you could do

asy h2.asy or if you want interactive asy -batchView h2.asy

h2.png
H2

Citation

If you find this project useful and want to cite it, consider adding this bibtex entry to your citations.

1 @misc{asyatoms,
2  author = {Alejandro Gallo},
3  title = {An asymptote package for rendering atomic structures},
4  year = {2016},
5  publisher = {GitHub},
6  journal = {GitHub repository},
7  howpublished = {\url{https://github.com/alejandrogallo/asy-atoms}},
8 }

Whish list

Example

siv.png
SiV defect in diamond