Skip to main content

For easily making chemical buffers and solutions

Project description

Welcome to buf!

Buf is a command line based toolkit for making chemical buffers/solutions. Tired of calculating how much of each chemical you need to weight out when making solutions? Buf can help. Specifically, buf:

  1. Allows you to develop a chemical library, saving the molar masses of frequently used chemicals.

  2. Allows you to use those chemicals to define recipes for your buffers/solutions, in which you specify the concentration of each ingredient required to make the buffer.

  3. Will ‘make’ those recipes for you, calculating how much of each ingredient you require to produce the volume of buffer you specify.

Installation

To install the buf toolkit, simply use pip install buf.

Getting Started

To introduce you to buf, let’s imagine that we want to make a solution containing 50mM NaCl, is 10% glycerol by volume, and contains a constant 5g of KCl, regardless of the volume of our solution. We want to make 5L of this solution.

Developing Our Chemical Library

In our recipe, we specify the concentration of NaCl with molarity. Before buf can calculate the mass of NaCl we will need to add to our buffer when we make it, we must first tell buf the molar mass of NaCl (58.44 g/mol) by adding the chemical to our library. This can be done with buf chemical -a 58.44 NaCl. We don’t need to tell buf about the molar masses of glycerol or KCl, since the amounts of those chemicals we will add to our buffer aren’t dependent on their molar masses.

Defining Our Recipe

Now that our chemical library has been defined, it is time to do the same with our recipe library. Here we will tell buf what we want to make. We define our recipe by giving it a name and listing its contents, using buf recipe -a best_recipe 50mM NaCl 10% glycerol 5g KCl. Now buf knows the ingredients of our solution; it’s finally time to make it!

Making Our Solution

To calculate how much of each chemical we’ll need for our 5L solution, all we need to use is buf make 5L best_recipe. Buf will use our stored chemical and recipe libraries to calculate the required amounts of each ingredient, and display the results.

Learning More

This tutorial only provides a brief overview of buf; for more details about the toolkit’s usage and functionality, see buf help. For specific information about a subcommand, see buf help <subcommand_name>. Happy buffer making!

Version History

  • 1.0.0a1: First release of buf to Test PyPI!

  • 1.0.0a6: First release to PyPI proper.

  • 1.0.0a7: Improved documentation.

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

buf-1.0.0a7.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

buf-1.0.0a7-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file buf-1.0.0a7.tar.gz.

File metadata

  • Download URL: buf-1.0.0a7.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.12.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.0

File hashes

Hashes for buf-1.0.0a7.tar.gz
Algorithm Hash digest
SHA256 395549117edd4e5b3ea56aa6fd76cf8727d9906274189647be3ded6661a46e62
MD5 1883b44bc81e4b1f6cb247ca97c97fbd
BLAKE2b-256 8f514770e03dcfe37fecf9e76849fea5a1b25867f24b1be73bf9a1bb53aec89d

See more details on using hashes here.

File details

Details for the file buf-1.0.0a7-py3-none-any.whl.

File metadata

  • Download URL: buf-1.0.0a7-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.12.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.0

File hashes

Hashes for buf-1.0.0a7-py3-none-any.whl
Algorithm Hash digest
SHA256 04df4701723c2d239f2d83c7df9ccf64811b719e5451ff0844bd4d5338f8187a
MD5 5e2eed09d1a8fdaa336f582173cf9384
BLAKE2b-256 c73bf3354d675a587e49ba2a74e77e2a66ad800433635668e0003e644c6d29ec

See more details on using hashes here.

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