Skip to main content

Contact Molecular Surface calculation for protein design — a Python port of Longxing Cao's C++ implementation

Project description

Longxing Cao's Contact Molecular Surface has been ported to python to allow the next generation of protein designers to use it with ease. Contact Molecular Surface (contact ms) is based on Lawrence and Colman's 1993 paper where they calculate Shape Complementarity. The difference is that instead of returning a singular value denoting the shape complementarity, contact ms instead returns a distance-weighted surface area of the target molecule.

At it's core, contact ms is based on the following formula: contact_ms = area * exp( -0.5 * distance**2)

Where area is the interfacial area on the target and distance is the distance between the binder and the target (from the molecular surfaces) at that point.

Here's an image from (Brian Coventry dissertation) explaining why contact ms is better than SASA or Shape Complementarity: image

(Look up Brian Coventry Dissertation if you want the full story about it's pros and cons)

In terms of using this library, there are really only two functions you need:

from py_contact_ms import calculate_contact_ms, get_radii_from_names

# You'll have to figure out how to generate the following arrays
binder_xyz = xyz of binder heavy-atoms (non-hydrogen)
binder_res_names = list of residue name3 for each xyz (so like [ARG, ARG, ARG, LYS])
binder_atom_names = list of atom names for each xyz, stripped (so like [N, CA, C, O])
target_xyz = ...
target_res_names = ...
target_atom_names = ...

# Do not supply your own radii! CMS requires specific radii
binder_radii = get_radii_from_names(binder_res_names, binder_atom_names)
target_radii = get_radii_from_names(target_res_names, target_atom_names)

# Remember, contact_ms is only on the target side by convention
contact_ms, per_target_atom_cms, calc = calculate_contact_ms(binder_xyz, binder_radii, target_xyz, target_radii)

# If you also want the binder-side, you can do this (avoids recomputing everything)
binder_cms, per_binder_atom_cms = calc.calc_contact_molecular_surface(target_side=False)

# If you are doing small-molecule design, you may also want to know the maximum CMS possible (basically the surface area)
from py_contact_ms import calculate_maximum_possible_contact_ms
max_target_cms, max_target_cms_per_atom = calculate_maximum_possible_contact_ms(target_xyz, target_radii)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_contact_ms-0.1.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_contact_ms-0.1.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file py_contact_ms-0.1.1.tar.gz.

File metadata

  • Download URL: py_contact_ms-0.1.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_contact_ms-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0019b90119ad3eaa1775e454b2c1c772022f26e4ac707fcc6ce17e1b1f7a91d2
MD5 9861c54c8f293275b0c0de9ccd803af0
BLAKE2b-256 6528a6b45e01422c07bdd05c2cb59b3736839d4c8c7eb0a2ef65df76979a1c31

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_contact_ms-0.1.1.tar.gz:

Publisher: publish.yml on ullahsamee/py_contact_ms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_contact_ms-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: py_contact_ms-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_contact_ms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7a5872f70607541d7e54b4ca8b1797714910be9c1ddd82de987fc82b5e9e47
MD5 2baf88cee19d230c44dd356b34fcf24a
BLAKE2b-256 b6a9aa891b3a13f62b6b429b65b69a22ebddf182602ffd4df79e7d3b8789b98a

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_contact_ms-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ullahsamee/py_contact_ms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page