copuladock / code /compact_v1 /README.md
liofoil's picture
Add files using upload-large-folder tool
0cb481f verified
|
Raw
History Blame Contribute Delete
1.35 kB

compact_v1 construction and reader code

This directory contains the minimum code needed to read the released compact shards and to rebuild the same format from PDB docking poses.

Read an existing release

Only compact_graph_dataset.py is required for normal training. It provides CompactGraphDataset, which opens tensor-only shard files lazily with torch.load(..., mmap=True) and reconstructs standard PyTorch Geometric Data objects.

Build compact shards from PDB poses

Keep these three files in the same directory because the builder imports the other two by filename:

  • build_compact_v1_direct.py
  • build_graph_unified_enhanced.py
  • convert_to_compact_v1.py

The direct builder expects a flat directory with one subdirectory per system containing protein.pdb, ligand.pdb, and predicted pose .pdb files. materialize_hiqbind_gnncp.py converts Docking Base common outputs to that layout through hard links.

build_compact_v1_direct.sbatch is an example Slurm wrapper only. Review and adapt account, partition, Python environment, paths, CPU count, and memory for your own cluster before use.

Run the bundled unit tests after changing the format code:

python -m unittest -v test_compact_graph_dataset.py test_build_compact_v1_direct.py

See ../../docs/DATASET_USAGE_ZH.md for the Chinese user guide.