Skip to content

Zhaoli2042/gRASPA-Agent-HTC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRASPA-Agent-HTC

A working, portable build of the gRASPA high-throughput-computing (HTC) Monte Carlo code.

This is a snapshot of gRASPA-HTC-032324 with one critical CUDA portability fix that prevented the original from running on:

  • NVIDIA HPC SDK toolchains newer than 22.5
  • GPUs other than the original RTX 3090

For the diagnostic story behind the fix, see BUGFIX.md.

What it does

GPU-accelerated Grand Canonical Monte Carlo (GCMC) for adsorption in nanoporous frameworks. Runs many (framework × temperature × pressure) simulations in parallel as independent CUDA blocks — designed for screening large MOF databases (e.g. CoRE-MOF) on a single GPU.

  • Moves: translation, rotation, insertion, deletion (no CBMC).
  • Interactions: 12-6 Lennard-Jones, short-range Coulomb, Ewald summation.
  • Inputs: CIF frameworks + RASPA-style .def files for adsorbates and force fields.

For the full-featured upstream tree (CBMC, TMMC, mixtures, ML potentials, Gibbs ensemble, restart files, etc.), see snurr-group/gRASPA.

Requirements

  • An NVIDIA GPU.
  • NVIDIA HPC SDK (provides nvc++). Tested with 24.5. Older versions ≥ 22.5 should also work.
  • Linux.

Build

cd src
bash NVC_COMPILE

This produces nvc_main.x. The default -gpu=cc89 targets RTX 4090 (Ada). Edit NVC_COMPILE for other architectures:

GPU Flag
RTX 3090 -gpu=cc86
RTX 4090 -gpu=cc89
A100 -gpu=cc80
H100 -gpu=cc90

A multi-arch fatbin works too: -gpu=cc80,cc86,cc89,cc90.

Run the smoke test

cd examples/CO2-MFI-smoke
./run.sh

Expected: loading converges to ~70 CO2 per cell in MFI at 298 K, 1 bar, in about 5 seconds on an RTX 4090. See examples/CO2-MFI-smoke/README.md for the detail.

Layout

src/                  Source (single-translation-unit; main.cpp pulls all headers)
src/NVC_COMPILE       Build script
src/mps/              Scripts for running multiple jobs on one GPU via NVIDIA MPS
examples/             Worked example with input files
BUGFIX.md             Diagnostic write-up of the shared-memory layout bug that was fixed

Running on many frameworks

The HTC kernel is designed for one process to drive many (framework × T × P) simulations as independent CUDA blocks in a single launch. To do this, replace the example's FrameworkList pointer with a list of your CIFs and set Framework_start / Framework_end to the slice you want:

FrameworkList path/to/your_mof_list.txt
Framework_start 0
Framework_end   100

Each CIF in the list must end with .cif and live in the directory referenced by the list file path.

Origin

Based on gRASPA-HTC-032324-Code (March 23, 2024) from the Snurr group at Northwestern. Patched May 2026 to fix a CUDA shared-memory layout bug — see BUGFIX.md.

License

MIT. See LICENSE.

About

Experiment with gRASPA-HTC code, with the help from a smarter mind and a strict expert.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors