Tool Wrappers (modelarchive.tool)
I.O.U. a nice introduction.
MAXIT (modelarchive.tools.maxit)
MAXIT from RCSB converts coordinate files in PDB legacy format to CIF and CIF files to mmCIF. This module also adds functionality to turn a PDB file into a (minimalist) ModelCIF file. But don’t get too excited - none of the functionality will turn a PDB file into a fully annotated ModelCIF file. It just makes sure the starting point is of valid CIF syntax. Extra data still need to be added…
MAXIT is not bundled with this module. The source code can be downloaded here. Installation instructions are available, and here is a TL;DR how to compile on macOS and most Linux distributions:
# cd into the unpacked source directory first
export RCSBROOT=$(pwd)
make
make binary
# binaries are found in bin/
# RCSBROOT needs to point at data/ when running maxit
- modelarchive.tools.maxit.MAXIT_BINARY = 'maxit'
Path to the maxit binary, defaults to
maxitfrom$PATH.Can be overridden by setting the
MAXIT_BINARYenvironment variable before import, or by assigning directly in a function call.
- modelarchive.tools.maxit.cif2mmcif(infile, outfile)[source]
Convert a CIF file to mmCIF using MAXIT.
Only returns log messages upon failure.
- modelarchive.tools.maxit.fixing_pdb2mmcif(pdb_as_string, outfile)[source]
Convert a PDB legacy format string to mmCIF, fixing known issues.
Adds missing chain names if necessary before conversion. Only returns log messages upon failure.
- modelarchive.tools.maxit.pdb2cif(infile, outfile)[source]
Convert a PDB legacy format file to CIF using MAXIT.
Only returns log messages upon failure.
- modelarchive.tools.maxit.pdb2mmcif(infile, outfile)[source]
Convert a PDB legacy format file to mmCIF using MAXIT.
Runs MAXIT first in PDB to CIF mode, then converts the result to mmCIF. Only returns log messages upon failure.
- Parameters:
- Returns:
- MAXIT log messages on failure, empty list on success.
On failure, the first element indicates which conversion step failed.
- Return type:
- Raises:
RuntimeError – If
RCSBROOTenvironment variable is not set.
- modelarchive.tools.maxit.run_maxit(infile, outfile, mode, logfile=None)[source]
Run MAXIT without checks, mode-preselection, or cleanup.
- Parameters:
- Returns:
Result of the MAXIT run.
- Return type: