Claude Code Plugins

Community-maintained marketplace

Feedback
15
0

Study protein folding mechanisms, predict folding pathways, and analyze folding kinetics.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name protein-folding
description Study protein folding mechanisms, predict folding pathways, and analyze folding kinetics.

Protein Folding

Study how proteins fold from linear sequences into functional 3D structures, including folding pathways and kinetics.

Folding Free Energy Calculations

import numpy as np

def calculate_folding_stability(temperature, enthalpy, entropy, heat_capacity):
    """Calculate protein folding free energy using Gibbs-Helmholtz equation."""
    T = temperature  # Kelvin
    T_ref = 298.15   # Reference temperature

    # Temperature-dependent enthalpy and entropy
    delta_H = enthalpy + heat_capacity * (T - T_ref)
    delta_S = entropy + heat_capacity * np.log(T / T_ref)

    # Gibbs free energy
    delta_G = delta_H - T * delta_S

    return {
        'delta_G': delta_G,
        'delta_H': delta_H,
        'delta_S': delta_S,
        'stable': delta_G < 0
    }

# Example: typical small protein
stability = calculate_folding_stability(
    temperature=310,    # Body temperature
    enthalpy=-50000,    # J/mol
    entropy=-150,       # J/mol/K
    heat_capacity=5000  # J/mol/K
)
print(f"Folding free energy: {stability['delta_G']/1000:.1f} kJ/mol")

Contact Order and Folding Rate

def calculate_contact_order(contacts, sequence_length):
    """
    Calculate relative contact order (CO).
    Higher CO = slower folding.
    """
    total_separation = sum(abs(i - j) for i, j in contacts)
    contact_order = total_separation / (len(contacts) * sequence_length)
    return contact_order

def predict_folding_rate(contact_order):
    """
    Predict folding rate from contact order.
    Based on Plaxco et al. correlation.
    """
    # ln(k_f) = a - b * CO
    a, b = 15.3, 75.2
    ln_kf = a - b * contact_order
    return np.exp(ln_kf)

# Calculate for a protein
contacts = [(1, 10), (5, 15), (8, 20), (12, 25), (3, 30)]
co = calculate_contact_order(contacts, sequence_length=50)
rate = predict_folding_rate(co)
print(f"Contact order: {co:.3f}")
print(f"Predicted folding rate: {rate:.1f} s^-1")

Phi-Value Analysis

def calculate_phi_value(ddG_folding, ddG_unfolding):
    """
    Calculate phi-value for a mutation.
    Phi = 1: Residue structured in transition state
    Phi = 0: Residue unstructured in transition state
    """
    phi = ddG_unfolding / ddG_folding
    return max(0, min(1, phi))  # Constrain to 0-1

def interpret_phi(phi):
    if phi > 0.7:
        return "Structured in transition state (folding nucleus)"
    elif phi < 0.3:
        return "Unstructured in transition state"
    else:
        return "Partially structured"

Folding Funnel Visualization

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

def plot_folding_funnel():
    """Visualize the protein folding energy landscape."""
    theta = np.linspace(0, 4*np.pi, 100)
    z = np.linspace(0, 1, 100)
    r = z  # Radius decreases as we go down

    x = r * np.cos(theta)
    y = r * np.sin(theta)

    fig = plt.figure(figsize=(8, 6))
    ax = fig.add_subplot(111, projection='3d')

    # Create funnel surface
    theta_grid, z_grid = np.meshgrid(np.linspace(0, 2*np.pi, 50), z)
    r_grid = z_grid
    x_grid = r_grid * np.cos(theta_grid)
    y_grid = r_grid * np.sin(theta_grid)

    ax.plot_surface(x_grid, y_grid, -z_grid, alpha=0.5, cmap='coolwarm')
    ax.set_xlabel('Conformational coordinate 1')
    ax.set_ylabel('Conformational coordinate 2')
    ax.set_zlabel('Free energy')
    ax.set_title('Protein Folding Funnel')

    plt.savefig('folding_funnel.png')

Two-State Folding Model

def two_state_folding(time, k_fold, k_unfold, initial_folded_fraction=0):
    """
    Simulate two-state folding kinetics.
    U <-> F with rate constants k_fold and k_unfold
    """
    k_obs = k_fold + k_unfold
    f_eq = k_fold / k_obs  # Equilibrium folded fraction

    # Time-dependent folded fraction
    f_t = f_eq + (initial_folded_fraction - f_eq) * np.exp(-k_obs * time)

    return f_t

# Simulate folding kinetics
time = np.linspace(0, 0.1, 100)  # seconds
folded = two_state_folding(time, k_fold=100, k_unfold=1, initial_folded_fraction=0)

plt.plot(time * 1000, folded)
plt.xlabel('Time (ms)')
plt.ylabel('Folded fraction')
plt.title('Two-State Folding Kinetics')
plt.savefig('folding_kinetics.png')

Key Concepts

  • Levinthal's paradox: Proteins fold much faster than random search
  • Folding funnel: Energy landscape guides folding
  • Nucleation-condensation: Folding initiates at specific regions
  • Molten globule: Compact intermediate with native-like secondary structure
  • Chaperones: Assist folding and prevent aggregation