Hybrid Brownian + Monte Carlo Example#
This example demonstrates a conservative hybrid workflow built entirely from
existing public PyMembrane APIs. It uses the documented open +1
disclination setup and alternates Brownian dynamics vertex relaxation with
Monte Carlo vertex moves.
What This Example Demonstrates#
The packaged module reuses the same disclination mesh from
InputFiles.zip, the same box size, and the same elastic forces as the
existing Brownian and Monte Carlo disclination examples:
harmonic stretching,
limit protection,
dihedral bending.
Within each cycle it performs:
Brownian dynamics with
Mesh>Brownian>vertex>move.Monte Carlo sampling with
Mesh>MonteCarlo>vertex>move.VTK output with
system.dumper.vtk(...).
--quick reduces only the number of cycles and the MD/MC step counts. It
does not change the model, mesh, force constants, or integrator names.
How to Run#
python -m pymembrane.examples.hybrid_mc_bd --quick
To write files into a separate directory:
python -m pymembrane.examples.hybrid_mc_bd --quick --output-dir results
Inputs#
packaged disclination mesh from
InputFiles.zipdefault mesh size parameter:
N=14output directory: current working directory unless
--output-diris used
Model Ingredients#
mesh: open
+1disclination reused from the documented disclination examplesforces:
Mesh>Harmonic,Mesh>Limit,Mesh>Bending>Dihedralintegrators:
Mesh>Brownian>vertex>moveandMesh>MonteCarlo>vertex>moveboundary condition: non-periodic
Expected Output#
initial_mesh.vtkhybrid_t0.vtkadditional
hybrid_t*.vtksnapshotsoutput format: legacy ASCII
.vtk
Quick Mode#
Quick mode keeps the same mesh, forces, and hybrid order, but reduces the number of cycles and the MD/MC step counts.
How to visualize the result#
Open the generated VTK files in ParaView to inspect how the same disclination relaxes under alternating Brownian dynamics and Monte Carlo updates.
Source and packaged versions#
The source physics comes from the documented disclination examples under
docs/examples/01_disclination. The installed runnable module is
pymembrane.examples.hybrid_mc_bd.