# `cif`

CIF parsing methods.

This methods use the pdbx/cif parser provided by WWPDB (http://mmcif.wwpdb.org/docs/sw-examples/python/html/index.html)

Code author: Juan Brandi

pdb2pqr.cif.atom_site(block)

  Handle ATOM_SITE block.

  Data items in the ATOM_SITE category record details about the atom sites in a macromolecular crystal structure, such as the positional coordinates, atomic displacement parameters, magnetic moments and directions. (Source: https://j.mp/2Zprx41)

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.ATOM objects, array of things that weren’t handled by parser)

  Return type:

    ([Atom], [str])

pdb2pqr.cif.author(block)

  Handle AUTHOR block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.cispep(block)

  Handle CISPEP block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.compnd(block)

  Handle COMPND block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.conect(block)

  Handle CONECT block.

  Data items in the STRUCT_CONN category record details about the connections between portions of the structure. These can be hydrogen bonds, salt bridges, disulfide bridges and so on.

  The `STRUCT_CONN_TYPE` records define the criteria used to identify these connections. (Source: https://j.mp/3gPkJT5)

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.count_models(block)

  Count models in structure file block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    number of models in block

  Return type:

    int

pdb2pqr.cif.cryst1(block)

  Handle CRYST1 block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.expdata(block)

  Handle EXPDTA block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.header(block)

  Handle HEADER block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.keywds(block)

  Handle KEYWDS block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.origxn(block)

  Handle ORIGXn block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.read_cif(cif_file)

  Parse CIF-format data into array of Atom objects.

  Todo

  Manage several blocks of data.

  Parameters:

    file (file) – open file-like object

  Returns:

    (a dictionary indexed by PDBx/CIF record names, a list of record names that couldn’t be parsed)

  Return type:

    (dict, [str])

pdb2pqr.cif.scalen(block)

  Handle SCALEn block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.source(block)

  Handle SOURCE block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.ssbond(block)

  Handle SSBOND block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])

pdb2pqr.cif.title(block)

  Handle TITLE block.

  Parameters:

    block ([str]) – PDBx data block

  Returns:

    (array of pdb.conect objects, array of things that did not parse)

  Return type:

    ([pdb.CONECT], [str])