pyqed.protein package

Submodules

pyqed.protein.cd module

Peptide-exciton circular dichroism for proteins.

This module provides a lightweight far-UV protein CD model. It identifies peptide-bond chromophores from PDB coordinates, assigns an approximate amide transition dipole, builds a dipole-dipole exciton Hamiltonian, and computes coupled-oscillator rotatory strengths. It is intended for protein-scale screening and structure-to-spectrum trends, not as a replacement for the ab-initio small-molecule pyqed.qchem.cd module.

class pyqed.protein.cd.PDBAtom(serial: int, name: str, residue_name: str, chain_id: str, residue_id: int, insertion_code: str, coord_angstrom: ndarray, element: str)

Bases: object

One atom record parsed from a PDB file.

chain_id: str
coord_angstrom: ndarray
element: str
insertion_code: str
name: str
residue_id: int
property residue_key
residue_name: str
serial: int
class pyqed.protein.cd.PeptideChromophore(label: str, residue_key: tuple, next_residue_key: tuple, center_angstrom: ndarray, dipole_unit: ndarray, transition_energy_ev: float, transition_dipole_debye: float)

Bases: object

Approximate amide chromophore for one peptide bond.

center_angstrom: ndarray
property center_bohr
property dipole_au
dipole_unit: ndarray
label: str
next_residue_key: tuple
residue_key: tuple
transition_dipole_debye: float
transition_energy_ev: float
class pyqed.protein.cd.ProteinCD(chromophores, dielectric=1.0)

Bases: object

Peptide-exciton circular dichroism model for a protein backbone.

classmethod from_pdb(source, transition_energy_ev=6.5, transition_dipole_debye=4.0, dielectric=1.0, include_hetero=False, model=1, max_peptide_bond_angstrom=1.8)
run()

Diagonalize the exciton Hamiltonian and compute CD strengths.

spectrum(*args, **kwargs)

Return a broadened spectrum from run() data.

class pyqed.protein.cd.ProteinCDResult(chromophores: list, site_energies_ev: ndarray, hamiltonian_ev: ndarray, exciton_energies_ev: ndarray, coefficients: ndarray, transition_dipoles_au: ndarray, rotatory_strengths_au: ndarray, oscillator_strengths: ndarray)

Bases: object

Exciton CD transition data for a protein peptide-backbone model.

chromophores: list
coefficients: ndarray
exciton_energies_ev: ndarray
hamiltonian_ev: ndarray
oscillator_strengths: ndarray
rotatory_strengths_au: ndarray
site_energies_ev: ndarray
spectrum(x=None, width=8.0, units='nm', lineshape='gaussian')

Return a broadened signed CD spectrum.

Parameters:
  • x (array_like, optional) – Grid in units. If omitted, a practical far-UV grid is created.

  • width (float, optional) – Gaussian sigma or Lorentzian half width in the chosen units.

  • units ({'nm', 'ev'}, optional) – Spectrum grid units. Wavelength broadening is an empirical visualization convention; energy broadening is the cleaner model variable.

  • lineshape ({'gaussian', 'lorentzian'}, optional) – Broadening function.

transition_dipoles_au: ndarray
property wavelengths_nm
pyqed.protein.cd.build_peptide_chromophores(atoms, transition_energy_ev=6.5, transition_dipole_debye=4.0, max_peptide_bond_angstrom=1.8)

Return approximate amide chromophores from PDB atom records.

One chromophore is placed on each peptide bond C_i-N_{i+1}. The transition dipole direction is approximated by the local carbonyl C->O direction.

pyqed.protein.cd.parse_pdb_atoms(source, include_hetero=False, model=1)

Parse ATOM records from PDB text or a PDB file path.

pyqed.protein.cd.peptide_exciton_hamiltonian(chromophores, dielectric=1.0)

Build a peptide exciton Hamiltonian in electronvolts.

pyqed.protein.cd.protein_cd_from_pdb(source, **kwargs)

Convenience wrapper returning ProteinCD.from_pdb(source, ...).run().

Module contents

Protein spectroscopy models.

class pyqed.protein.PDBAtom(serial: int, name: str, residue_name: str, chain_id: str, residue_id: int, insertion_code: str, coord_angstrom: ndarray, element: str)

Bases: object

One atom record parsed from a PDB file.

chain_id: str
coord_angstrom: ndarray
element: str
insertion_code: str
name: str
residue_id: int
property residue_key
residue_name: str
serial: int
class pyqed.protein.PeptideChromophore(label: str, residue_key: tuple, next_residue_key: tuple, center_angstrom: ndarray, dipole_unit: ndarray, transition_energy_ev: float, transition_dipole_debye: float)

Bases: object

Approximate amide chromophore for one peptide bond.

center_angstrom: ndarray
property center_bohr
property dipole_au
dipole_unit: ndarray
label: str
next_residue_key: tuple
residue_key: tuple
transition_dipole_debye: float
transition_energy_ev: float
class pyqed.protein.ProteinCD(chromophores, dielectric=1.0)

Bases: object

Peptide-exciton circular dichroism model for a protein backbone.

classmethod from_pdb(source, transition_energy_ev=6.5, transition_dipole_debye=4.0, dielectric=1.0, include_hetero=False, model=1, max_peptide_bond_angstrom=1.8)
run()

Diagonalize the exciton Hamiltonian and compute CD strengths.

spectrum(*args, **kwargs)

Return a broadened spectrum from run() data.

class pyqed.protein.ProteinCDResult(chromophores: list, site_energies_ev: ndarray, hamiltonian_ev: ndarray, exciton_energies_ev: ndarray, coefficients: ndarray, transition_dipoles_au: ndarray, rotatory_strengths_au: ndarray, oscillator_strengths: ndarray)

Bases: object

Exciton CD transition data for a protein peptide-backbone model.

chromophores: list
coefficients: ndarray
exciton_energies_ev: ndarray
hamiltonian_ev: ndarray
oscillator_strengths: ndarray
rotatory_strengths_au: ndarray
site_energies_ev: ndarray
spectrum(x=None, width=8.0, units='nm', lineshape='gaussian')

Return a broadened signed CD spectrum.

Parameters:
  • x (array_like, optional) – Grid in units. If omitted, a practical far-UV grid is created.

  • width (float, optional) – Gaussian sigma or Lorentzian half width in the chosen units.

  • units ({'nm', 'ev'}, optional) – Spectrum grid units. Wavelength broadening is an empirical visualization convention; energy broadening is the cleaner model variable.

  • lineshape ({'gaussian', 'lorentzian'}, optional) – Broadening function.

transition_dipoles_au: ndarray
property wavelengths_nm
pyqed.protein.build_peptide_chromophores(atoms, transition_energy_ev=6.5, transition_dipole_debye=4.0, max_peptide_bond_angstrom=1.8)

Return approximate amide chromophores from PDB atom records.

One chromophore is placed on each peptide bond C_i-N_{i+1}. The transition dipole direction is approximated by the local carbonyl C->O direction.

pyqed.protein.parse_pdb_atoms(source, include_hetero=False, model=1)

Parse ATOM records from PDB text or a PDB file path.

pyqed.protein.peptide_exciton_hamiltonian(chromophores, dielectric=1.0)

Build a peptide exciton Hamiltonian in electronvolts.

pyqed.protein.protein_cd_from_pdb(source, **kwargs)

Convenience wrapper returning ProteinCD.from_pdb(source, ...).run().