Polymer Setup Guide

This guide covers configuring polymer chains in PolyzyMD simulations.

Tip

Looking for dynamic polymer generation? If you want to generate polymers on-the-fly from SMILES strings (without pre-built SDF files), see the Dynamic Polymer Generation tutorial.

Overview

PolyzyMD supports adding random co-polymer chains to your simulation box. Polymers are:

  • Generated based on monomer probabilities

  • Placed around the enzyme using PACKMOL

  • Parameterized with OpenFF force fields

Basic Configuration

polymers:
  enabled: true
  type_prefix: "SBMA-EGPMA"
  
  monomers:
    - label: "A"
      probability: 0.98
      name: "SBMA"
    - label: "B"
      probability: 0.02
      name: "EGPMA"
  
  length: 5      # 5-mer chains
  count: 2       # 2 polymer chains

Monomer Definition

Probability-Based Selection

Each chain is built by randomly selecting monomers based on their probabilities:

monomers:
  - label: "A"
    probability: 0.98    # 98% chance
    name: "SBMA"
  - label: "B"
    probability: 0.02    # 2% chance
    name: "EGPMA"

Important

Probabilities must sum to 1.0 (100%).

Multiple Monomers

You can define any number of monomer types:

monomers:
  - label: "A"
    probability: 0.70
    name: "MonomerA"
  - label: "B"
    probability: 0.20
    name: "MonomerB"
  - label: "C"
    probability: 0.10
    name: "MonomerC"

Homopolymers

For a homopolymer (single monomer type):

monomers:
  - label: "A"
    probability: 1.0
    name: "PEG"

Chain Configuration

Chain Length

Number of monomers per chain:

length: 5    # 5-mer (pentamer)

Typical values:

  • Short chains: 3-5 monomers (faster simulations)

  • Medium chains: 10-20 monomers

  • Long chains: 50+ monomers (slower, more realistic)

Number of Chains

count: 2    # Add 2 polymer chains

More chains = larger system = slower simulation.


Pre-Built Polymer SDFs

For reproducibility, you can provide pre-built polymer structures instead of random generation.

Directory Structure

polymer_sdfs/
└── SBMA-EGPMA/
    ├── AAAAA.sdf     # All A monomers
    ├── AAAAB.sdf     # 4 A's, 1 B
    ├── AAABA.sdf
    ├── AABAA.sdf
    └── ...

Configuration

polymers:
  enabled: true
  type_prefix: "SBMA-EGPMA"
  monomers:
    - label: "A"
      probability: 0.98
      name: "SBMA"
    - label: "B"
      probability: 0.02
      name: "EGPMA"
  length: 5
  count: 2
  sdf_directory: "polymer_sdfs/SBMA-EGPMA"    # Path to pre-built SDFs

Naming Convention

SDF files must be named with the monomer sequence:

  • AAAAA.sdf - Sequence of 5 “A” monomers

  • AABBA.sdf - Sequence A-A-B-B-A

  • Labels must match those defined in monomers


Polymer Cache

Generated polymers are cached for reuse:

polymers:
  # ...
  cache_directory: ".polymer_cache"

This speeds up repeated runs with the same polymer sequences.

To clear the cache:

rm -rf .polymer_cache

Example Configurations

SBMA-EGPMA Co-polymer

Zwitterionic sulfobetaine with hydrophobic groups:

polymers:
  enabled: true
  type_prefix: "SBMA-EGPMA"
  monomers:
    - label: "A"
      probability: 0.98
      name: "SBMA"          # Sulfobetaine methacrylate
    - label: "B"
      probability: 0.02
      name: "EGPMA"         # Ethylene glycol phenyl ether methacrylate
  length: 5
  count: 2

PEG Homopolymer

Polyethylene glycol:

polymers:
  enabled: true
  type_prefix: "PEG"
  monomers:
    - label: "A"
      probability: 1.0
      name: "EthyleneGlycol"
  length: 10
  count: 4

Block Co-polymer (Approximate)

For a block-like structure, use pre-built SDFs:

polymers:
  enabled: true
  type_prefix: "Block-AB"
  monomers:
    - label: "A"
      probability: 0.5
      name: "BlockA"
    - label: "B"
      probability: 0.5
      name: "BlockB"
  length: 10
  count: 2
  sdf_directory: "polymer_sdfs/block_copolymer"   # Pre-built block structures

Disabling Polymers

Control Simulations

For enzyme-only (control) simulations:

polymers: null

Or explicitly:

polymers:
  enabled: false

Placement and Solvation

Polymers are placed in the simulation box using PACKMOL:

  1. Enzyme (+ substrate) placed at center

  2. Polymers placed around enzyme with minimum distance

  3. Water molecules fill remaining space

  4. Ions added to neutralize and reach target concentration

Box Padding

The solvent.box.padding affects polymer placement:

solvent:
  box:
    padding: 1.5    # nm - increase for more polymers

Larger padding = more space for polymers = larger system.


Troubleshooting

“PACKMOL failed”

Common causes:

  • Box too small for all components

  • Polymers too large

  • Tolerance too tight

Solutions:

solvent:
  box:
    padding: 2.0          # Increase padding
    tolerance: 2.5        # Increase tolerance (Angstrom)

“Force field assignment failed”

The polymer structure may have issues:

  • Check SDF files have correct bond orders

  • Try different charge method:

    substrate:
      charge_method: "am1bcc"    # More robust than NAGL
    

“Simulation unstable with polymers”

  • Run longer equilibration:

    simulation_phases:
      equilibration_stages:
        - name: "free_equilibration"
          duration: 2.0    # Increase from 1.0 ns
    
  • Use softer restraints initially

  • Check for clashes in initial structure


Performance Considerations

Configuration

System Size

Speed Impact

No polymers

Small

Fastest

2 × 5-mer

Medium

~10-20% slower

4 × 10-mer

Large

~30-50% slower

10 × 20-mer

Very large

~2-3× slower

Tip

Start with small polymer systems (2 × 5-mer) to test your setup before scaling up.


See Also