Skip to main content

biochemHH

biochemHH is a Python package supporting experimental protein engineering. It contains tools for cloning design, structure analysis, and structural file (GB, CIF) editing.

1. Create a new Python environment

Create a new Python environment (Python version >= 3.12).

2. Install the package

Activate the environment and run the following code:

pip install biochemHH==0.0.6

3. Copy example files to your working directory

Activate the environment, replace C:\biochemHH_work in the first line with your desired working directory, and run the code in Windows CMD. The folder will be created if it does not exist, and the example files will be copied into it.

set "WORKDIR=C:\biochemHH_work"

python -c "import biochemHH,pathlib,shutil; p=pathlib.Path(biochemHH.__file__).parent; d=pathlib.Path(r'%WORKDIR%'); d.mkdir(parents=True,exist_ok=True); [shutil.copy2(f,d/f.name) for n in ('example_input','example_script') for f in (p/n).rglob('*') if f.is_file() and f.suffix.lower() in ('.pdf','.gb','.py','.csv')]; print('Copied all matching files to',d)"

Notes:

  • It is recommended to install PyMOL for protein visualization.
  • All input/output files will be read from/written to your working directory. Move output files elsewhere after completion to avoid overwriting them.

4. Examples

4.1 Batch-mode cloning design

"""
Six types of variations are supported:
	1-aa substitution, e.g.,    _R13A
	1-aa deletion, e.g.,        _28del
	1-aa insertion, e.g.,       _90~91insE
	multi insertions, e.g.,     _101~102insEAT
	multi deletion, e.g.,       _130~135del
	deletion & insertion, e.g., _140~142delinsAAG'
	Multiple variations can be joined to form a notation for a plasmid.
"""

from biochemHH import GBparser

notations = ['_R13A_28del_90~91insE',       		# the first plasmid
	'_101~102insEAT_130~135del_140~142delinsAAG',   # the second plasmid 
	]

GBparser.cloning_design_wrapper_1(
	base_filename='pUCv2-cat',	
	feature_select='cat',		# a gene is annotated 'cat' in 'pUCv2-cat.gb' file
	notations=notations,
	species='ecoli',
	plasmid_prefix='pL-',
	oligo_prefix='Oz')

A detailed Demonstration_of_batch_mode_cloning_design.pdf and an example input pUCv2-cat.gb have been copied into your working directory in step 3.

4.2 Analyze noncovalent interactions

""" 
To specify a target_string:
	A:      A chain all residues
	P2:     P chain resi 2
	B1~23:  B chain resi 1~23
	These can be joined by space, forming target_string =  "A P2 B1~23"

To specify the chain to analyze against (coi):
	coi = ['A', 'B']    # analyze the target against all residues in chain A and B
	coi = []            # analyze the target against all residues in all chains
"""

from biochemHH import StructureHH

StructureHH.Shell_analyses_II( '8OV6.cif' ,
                               target_string='C501 B52~55',
                               coi=[],
                               exclude_van_der_waals=False,
                               exclude_intrachain_van_der_waals=False,
                               exclude_intrachain_noncovalent_bonds=False,
                               exclude_water=False
                               )

4.3 Structure file (CIF, PDB) editing

"""
If '5AXN.cif' does not already exist in the working directory, either command will automatically download it from RCSB database.
"""

from biochemHH import StructureHH

# ........................................ Duplicate a structure
StructureHH.copy_structure_file('5AXN.cif', new_filename = '5AXNcopy.pdb')


# ........................................ Rename chains
StructureHH.rename_chains('5AXN.cif', initial_chain_id=['A', 'B'], new_chain_id=['C', 'D'], new_filename = '5AXNedit.cif')	# The example rename chain 'A' -> 'C', chain 'B' -> 'D' respectively.


# ........................................ Delete chains
StructureHH.delete_chains('5AXN.cif', chains_to_remove = ['B','P'], new_filename = '5AXNedit.cif')


# ........................................ Edit chain: retain a list of residues
StructureHH.chain_shrinking('5AXN.cif', chain = 'A', resi_to_retain = range(10,200), new_filename='5AXNedit.cif')


# ........................................ Edit chain: remove a list of residues
StructureHH.chain_shrinking('5AXN.cif', chain='A', resi_to_remove = range(10,200), new_filename='5AXNedit.cif')


# ........................................ Duplicate a residue
StructureHH.duplicate_residue( '5AXN.cif', initial_chain_resi = ['A', 304], new_filename='5AXNedit.cif', verbose = True)

# ........................................ Edit residue: re-assign and rename
StructureHH.edit_residue('5AXN.cif', initial_chain_resi = ['A', 304], new_chain_resi = ['L', 1], new_resname = 'LIG', new_filename = '5AXNedit.cif')


# ........................................ Edit residue: remove certain atoms
StructureHH.edit_residue('5AXN.cif', initial_chain_resi = ['A', 304], remove_atoms = ["O2'", "O3'"], new_filename = '5AXNedit.cif')


# ........................................ ATOM to HETATM (some AI tools only consider HETATM as ligand)
StructureHH.atom_to_hetatm('5AXN.cif', chain_id = 'P', new_filename='5AXNedit.cif')

Metadata

Release files for biochemHH 0.0.7

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

Source distribution (sdist)

Source distribution for biochemHH 0.0.7
File Size Uploaded Provenance Actions
biochemhh-0.0.7.tar.gz 1.4 MB Without provenance Details for biochemhh-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biochemHH 0.0.7
File Interpreter ABI Platform Actions
biochemhh-0.0.7-py3-none-any.whl Python 3 none any Details for biochemhh-0.0.7-py3-none-any.whl

Total release size: 2.8 MB

Release files / biochemhh-0.0.7.tar.gz

Download URL biochemhh-0.0.7.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
24bcf7bca76b5d4a62fc87ab76eff68a1537d71cd1c8a4b08409e5ae16275fee
BLAKE2b-256 checksum
How to use checksums
b0655b1f6cf5d376bb827aa6163dde227592dad408e0ed9e10eac352d899d586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.5

Release files / biochemhh-0.0.7-py3-none-any.whl

Download URL biochemhh-0.0.7-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c8d12ccb75943f4d83d6c17330599e4da613068923ca2be54c6168a59e26f2bf
BLAKE2b-256 checksum
How to use checksums
875c5337e1337c81f63969c23fc94472c9b28db06757f58966e729ccbc3efda2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.5

Security for biochemHH 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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