cif-to-json

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i cif-to-json

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

18.2 kB

Total Files

8

Last publish

Collaborators

  • cheminfo-bot