1.0.0 • Published 4 years ago

cif-to-json v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

cif-to-json

NPM version build status npm download

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';
}

License

MIT