Skip to main content

peptide-mass

A small, no-dependency Python calculator for the theoretical masses of linear peptides built from the 20 standard amino acids. It gives monoisotopic and average masses plus the [M+H]⁺ … [M+5H]⁵⁺ m/z values you'd expect in electrospray, so you can check the identity (LC-MS) line of a certificate of analysis without doing the arithmetic by hand.

It's the packaged form of the calculator in peptide-reference-data (dataset DOI 10.5281/zenodo.23284819), maintained by Peptide.Express.

Install

pip install peptide-mass

Use

peptide-mass GEPPPGKPADDAGLV
# monoisotopic 1418.7042 Da | average 1419.54 Da
#   [M+1H]1+  m/z 1419.7114 ...

peptide-mass CYIQNCPLG --c-amide --disulfides 1   # oxytocin
peptide-mass --csv peptides.csv                   # writes masses.csv

Options: --n-acetyl, --c-amide, --pyroglu (N-terminal Q or E), --disulfides N.

from peptide_mass import mass, mz
mono, avg = mass("CYIQNCPLG", c_amide=True, disulfides=1)
print(round(mz(mono, 2), 4))

Scope and limits

  • Standard residues only. Non-standard residues and lipidated peptides aren't approximated.
  • Values are for the neutral free peptide, not a TFA or acetate salt. Counter-ions and water change the weighed mass, not the MS parent mass.
  • Average masses use IUPAC standard atomic weights; expect ±0.01–0.05 Da differences from other calculators.

License

MIT. For laboratory research use only. Not for human or veterinary use. Nothing in this package is dosing, clinical or medical information.

Metadata

Release files for peptide-mass 0.1.0

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

Source distribution (sdist)

Source distribution for peptide-mass 0.1.0
File Size Uploaded
peptide_mass-0.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peptide-mass 0.1.0
File Interpreter ABI Platform
peptide_mass-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / peptide_mass-0.1.0.tar.gz

Download URL peptide_mass-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
599bac5c8f3b2c1cb9515e2657f3957ec6f9686836f4201bf91f9694d814158d
BLAKE2b-256 checksum
How to use checksums
d71125740da1f877517830aef96a123c7b804be07648bc11318a271da5bcce69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / peptide_mass-0.1.0-py3-none-any.whl

Download URL peptide_mass-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2994917882e6b706c4e264509f9c26af6f3300ba7494f3bc06dd1cfad3e6e92f
BLAKE2b-256 checksum
How to use checksums
d9959325936afae1e5fefaa0107ba0bbc41123cf014ec231e11b63cb5eb35b93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

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