pyplate.Substance

class Substance(name: str, mol_type: int, molecule=None)[source]

Bases: object

An abstract chemical or biological entity (e.g., reagent, enzyme, solvent, etc.). Immutable. Enzymes are assumed to require zero volume.

name

Name of substance.

mol_weight

Molecular weight (g/mol).

specific_activity

Activity units per mass if Substance is an enzyme (U/g).

density

Density if Substance is a liquid (g/mL).

concentration

Calculated concentration if Substance is a liquid (mol/mL).

molecule

cctk.Molecule if provided.

__init__(name: str, mol_type: int, molecule=None)[source]

Create a new substance.

Parameters:
  • name – Name of substance.

  • mol_type – Substance.LIQUID, Substance.SOLID, or Substance.ENZYME.

  • molecule – (optional) A cctk.Molecule.

If cctk.Molecule is provided, molecular weight will automatically populate. Note: Support for isotopologues will be added in the future.

Methods

__init__(name, mol_type[, molecule])

Create a new substance.

enzyme(name, specific_activity[, molecule])

Creates an enzyme.

is_enzyme()

Return true if Substance is an enzyme.

is_liquid()

Return true if Substance is a liquid.

is_solid()

Return true if Substance is a solid.

liquid(name, mol_weight, density[, molecule])

Creates a liquid substance.

solid(name, mol_weight[, molecule])

Creates a solid substance.

Attributes

ENZYME

LIQUID

SOLID

classes

ENZYME = 3
LIQUID = 2
SOLID = 1
classes = {1: 'Solids', 2: 'Liquids', 3: 'Enzymes'}
static enzyme(name: str, specific_activity: str, molecule=None) Substance[source]

Creates an enzyme.

Parameters:
  • name – Name of enzyme.

  • specific_activity – A ratio of activity units to mass (‘10 U/g’, ‘10 U/mg’, ‘0.1 mg/U’)

  • molecule – (optional) A cctk.Molecule

Returns: New substance.

is_enzyme() bool[source]

Return true if Substance is an enzyme.

is_liquid() bool[source]

Return true if Substance is a liquid.

is_solid() bool[source]

Return true if Substance is a solid.

static liquid(name: str, mol_weight: float, density: float, molecule=None) Substance[source]

Creates a liquid substance.

Parameters:
  • name – Name of substance.

  • mol_weight – Molecular weight in g/mol

  • density – Density in g/mL

  • molecule – (optional) A cctk.Molecule

Returns: New substance.

static solid(name: str, mol_weight: float, molecule=None) Substance[source]

Creates a solid substance.

Parameters:
  • name – Name of substance.

  • mol_weight – Molecular weight in g/mol

  • molecule – (optional) A cctk.Molecule

Returns: New substance.