schrodinger.seam.testing.stu_tests.windows_seamdir_reuse module

Test that two pipelines can run in sequence without directory locking issues.

This is a regression test for HIT-671. On Windows, fep_pose_builder calls beam_confgen_align multiple times, each of which creates a new beam pipeline. The second pipeline’s call to SeamDir.create() fails with a PermissionError because worker subprocesses haven’t fully released file handles when the seam directory is cleaned up:

PermissionError: [WinError 32] The process cannot access the file because
it is being used by another process: '...\seam\workers\worker_0'

The fix adds retry logic in SeamDir.create() so that transient PermissionErrors from lingering worker handles are tolerated.

Usage:

$SCHRODINGER/run python3 -m schrodinger.seam.testing.stu_tests.windows_seamdir_reuse
schrodinger.seam.testing.stu_tests.windows_seamdir_reuse.run_pipeline(label: str)

Run a minimal pipeline that exercises subprocess worker creation.

The Reshuffle forces a stage break, causing subprocess workers to be launched and worker directories to be created under seam/workers/.

schrodinger.seam.testing.stu_tests.windows_seamdir_reuse.main()