cif-to-json
v1.0.0
Published
Parsing xray CIF (Crystallographic Information File)
Downloads
12
Readme
cif-to-json
Parse CIF (Crystallographic Information File) files.
Installation
$ npm install cif-to-json
API Documentation
Example
import { cifParser } from 'cif-to-json';
result = cifParser(cifString);
The result
will be an object in which
- the loops (
loop_
) are lists of objects. The main loop_atom_site
might look like
{
_atom_site_label: 'In1',
_atom_site_type_symbol: 'In',
_atom_site_fract_x: '0.30475(3)',
_atom_site_fract_y: '0.21073(1)',
_atom_site_fract_z: '0.21076(2)'
},
- all headers are in the output with the original tag, from the CIF, e.g.,
{
_cell_volume: '2999.477';
}