Convert CIF to BinaryCIF
BinaryCIF is an efficient, binary flavor of the CIF format. See specification and publication for further details.
This script reads data in CIF format and converts it lossless to a BinaryCIF file that can be read by Mol* or other applications.
Example
node lib/commonjs/cli/cif2bcif/index.js file.cif file.bcif
Usage
Argument | Description |
---|---|
src |
Source CIF to convert (can be gzipped) |
out |
Generated BinaryCIF output path |
-c |
Path to optional config file |
-f |
Path to optional filter file |
index.js [-h] [-c CONFIG] [-f FILTER] src out
Config file
Controls how certain columns will be encoded. This is a JSON array of instructions:
interface EncodingStrategyHint {
categoryName: string,
columnName: string,
encoding: 'pack' | 'rle' | 'delta' | 'delta-rle',
precision?: number
}
Filter file
Specifies which categories and columns will be written. This is a plain text file, each line represents one entry.
You can specify explicitly which categories or columns to include by adding category_name
or
category_name.field_name
. You can also choose to ignore some categories or columns by adding !category_name
or
!category_name.field_name
.