# crystvis-js

A Three.js based crystallographic visualisation tool. It reads multiple file formats and renders them with WebGL to a `canvas` element, allowing the user to interact with them. A few of the key functionality:

- visualize popular file formats as ball-and-stick structures, easily embedded within a webpage, with orbit mouse control for rotation and zooming;
- interactive visualisation responsive to user clicks via customizable callbacks;
- high definition text labels;
- advanced searching and selection functions to interact with specific subset of atoms (select by proximity, bonding, species and more);
- smart visualisation of molecular crystal: reconstruct full molecules across the periodic boundary;
- compute and display isosurfaces from volumetric data;
- visualize tensor data as ellipsoids centred on atoms.

### Supported formats

The currently supported file formats are the following:

- CIF, using crystcif-parse;
- XYZ, including Extended XYZ such as the one written by the Atomic Simulation Environment;
- CELL, input file supported by the DFT package CASTEP;
- Magres, output file format for simulated NMR parameters used by CASTEP and Quantum Espresso and developed by the CCP for NMR Crystallography.