Skip to content

Fix/cap.pdb file lookup when colbuilder is launched outside the working directory - #27

Open
ingcoder wants to merge 2 commits into
graeter-group:mainfrom
ingcoder:fix/glucosepane-colbuilder
Open

Fix/cap.pdb file lookup when colbuilder is launched outside the working directory#27
ingcoder wants to merge 2 commits into
graeter-group:mainfrom
ingcoder:fix/glucosepane-colbuilder

Conversation

@ingcoder

Copy link
Copy Markdown

How the bug was discovered
The bug appeared during a combined geometry and topology build of the 67 nm rat glucosepane fibril.

Geometry correctly wrote its cap files under the configured working directory:

rat_glucosepane_67nm_build/.tmp/geometry_gen/D/
However, Colbuilder was launched from /private/tmp. Topology step then searched for .tmp/geometry_gen relative to that shell directory instead:

/private/tmp/.tmp/geometry_gen
It found no caps and incorrectly used the existing fallback that re-extracts models from the fibril PDB. This changed the model numbering and caused topology generation to fail.

Why the fix is necessary
Temporary files should be found using config.working_directory, regardless of where the user launches Colbuilder. Fibril re-extraction should happen only when geometry caps are truly unavailable.

Fix
Use file_manager.geometry_dir and file_manager.mixing_dir to locate caps.
This allows the existing search to set cap_files_found = True and prevents unnecessary fibril re-extraction.
Import MODELLER-dependent sequence code only when sequence generation runs.
Test
Confirmed from a separate temporary launch directory that topology finds and copies the configured geometry caps without calling the fibril-extraction fallback.

Remap TER-extracted files to sparse system IDs and defer MODELLER-dependent imports for non-sequence runs.
Topology now reads caps from the configured working directory instead of the shell cwd, which removes the need for TER-extraction ID remapping.
@ingcoder ingcoder changed the title Fix topology cap lookup when launched outside the working directory Fix/Topology cap file lookup when colbuilder is launched outside the working directory Aug 31, 2026
@ingcoder ingcoder changed the title Fix/Topology cap file lookup when colbuilder is launched outside the working directory Fix/cap.pdb file lookup when colbuilder is launched outside the working directory Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant