Skip to main content

Multixem Refinement pipeline for multiple data sets in structure biology


PyPI version Test Status Downloads Code style: black


This is still a work in progress.

Installation

Install the latest code from this GitHub repository using:

pip install git+https://github.com/MartinMalyMM/multixem.git

Or install the released package from PyPI with pip:

pip install multixem

It is recommended to use a Python virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install multixem  # or pip install git+https://github.com/MartinMalyMM/multixem.git

Most of the dependencies (NumPy, pandas, GEMMI, MatPlotLib Python modules) will be installed automatically. You will also need Servalcat installed, typically from a recent CCP4 installation which also includes the Monomer Library.

Bootstrap

Subcommand bootstrap: Perform the bootstrap protocol - run multiple refinements in parallel against resampled sub data sets.

Example:

multixem bootstrap 10000 \
	--hklin 1PGJ_data.mtz \
	--model 1PGJ_model.pdb \
    --hklin_free 1PGJ_data.mtz \
	--prefix 1PGJ_bootstrap10000 \
	--servalcat_args "--ncycle 10" \
    --servalcat_confing "config.yaml" \
	--n_bins 30 \
	--n_proc 16 \
    --geometry_cids 1PGJ_geometry_obj.txt \
	--random_weights

Random weights will be assigned to reflection likelihood terms in the target log-likelihood function. A fraction of reflection will be assigned zero weights based on the provided free flag in --hklin_free or --hklin, or randomly if no free flag is provided, controlled by --fraction_zero.

The file given in 1PGJ_geometry_obj.txt defines parameters/features of the structure model under investigation. Each lines specifies an object using atomic CIDs divided by spaces. One CID in row denotes an occupancy, two an interactomic distance, three an angle between the atoms and four a torsion angle. For instance:

//A/505/O2
//A/505/O2 //A/262/CG
//A/505/O2 //A/262/CG //A/262/CD

Regarding the distances and angles, the procedure is suitable for investigation non-covalently linked atoms. The environment is locally unrestrained (Van der Waals anti-bumping restraints switched off) to provide unbiased results.

Unrestrained refinement of a small molecule can be performed using the following setting:

multixem bootstrap 10000 \
	--hklin 1513945.cif \
	--model 1513945.cif \
	--prefix 1513945_bootstrap10000 \
	--servalcat_args "--unre --hydrogen yes --refine_h --adp aniso --no_solvent --adpr_weight 0 --ncycle 20" \
	--n_bins 20 \
	--n_proc 16 \
	--random_weights

All currently available options are listed using:

multixem bootstrap --help

The options for Servalcat which could be provided through the --servalcat_args parameter to this Multixem pipeline can be listed using:

servalcat refine_xtal_norefmac --help

Comparison of isomorphous data sets

Subcommand pipeline: Compare the given diffraction data sets, refine given structure model(s) against them and compare them including calculation of isomorphous difference density maps (|Fobs,n|e^iɸn – k|Fobs,1|e^iɸ1). The input data set should be cut at the same resolution.

Example: comparison of bovine, pork and human insulin:

multixem pipeline \
	--hklin insuling_cow.mtz insuling_pig.mtz insuling_people.mtz \
	--hklin_free insuling_people.mtz \
	-p insulin \
	--model insuling_cow.pdb insuling_pig.pdb insuling_people.pdb \
	--n_bins 30 \
	--n_proc 4 \
	--unify_cell

Example: Merging and comparison of batches of unmerged diffraction data:

multixem pipeline \
	--hklin_unmerged insuling_people_unmerged.mtz \
	--hklin_free insuling_people.mtz \
	-p insulin_people_600 \
	--model insuling_people.pdb \
	--n_bins 30 \
	--n_proc 4 \
    --n_batches 600

All currently available options are listed using:

multixem pipeline --help

Tests

Automatic tests are implemented using pytest. They can be run using the following command:

python -m pytest -s -v

The integration tests use data from 6-phosphogluconate dehydrogenase (PDB 1PGJ, manuscript) and human, porcine, and bovine insulin (manuscript, raw data (DOI 10.5281/zenodo.13890874)).

Metadata

Release files for multixem 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multixem 0.3.3
File Size Uploaded
multixem-0.3.3.tar.gz 69.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multixem 0.3.3
File Interpreter ABI Platform
multixem-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 140.1 kB

Release files / multixem-0.3.3.tar.gz

Download URL multixem-0.3.3.tar.gz
Size 69.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2cda7b0fd5693214d4e199f7a209bfef770710898ec885d4a28e9ba15eb3fed8
BLAKE2b-256 checksum
How to use checksums
808cc16245430863c6393f94b0066a4c7746580967629d0cfca0436bae71efeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / multixem-0.3.3-py3-none-any.whl

Download URL multixem-0.3.3-py3-none-any.whl
Size 70.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
147dd92c860d31fd4c413a8e8a3e1f5dc2c24a275a31e7f26d68e9683fcda171
BLAKE2b-256 checksum
How to use checksums
3f119c0204ad5e87ada89edd6320e0051891e9972493585d8af9489791d8e386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page