agentleFS
dtunaidtunai/agent-skills-for-compute/skills/physicsnemo/SKILL.md

physicsnemo

Skill8 starsChanged 8 months agoMITView on GitHub

Provides NVIDIA PhysicsNeMo patterns for building, training, and deploying physics-informed machine learning models at scale. Applies to tasks involving neural operators (FNO, AFNO), weather/climate modeling (FourCastNet, CorrDiff, GraphCast), scientific simulation surrogates, physics-constrained training, or distributed GPU training for scientific AI.

  • Installs packages

The file

Files
SKILL.md

PhysicsNeMo

Overview

Open-source Python framework for building, training, and fine-tuning physics-informed AI models on NVIDIA GPUs. PhysicsNeMo provides optimized model architectures (FNO, AFNO, GNNs, diffusion models), scalable distributed training, and physics-constrained learning — enabling real-time AI surrogates for scientific simulation across weather, CFD, molecular dynamics, and engineering domains.

Quick Pattern

Incorrect — manual PyTorch training without physics optimization:

model = MyModel().cuda()
for batch in dataloader:
    pred = model(batch)
    loss = F.mse_loss(pred, target)
    loss.backward()

Correct — PhysicsNeMo with optimized training and CUDA graphs:

import physicsnemo
from physicsnemo.datapipes.benchmarks.darcy import Darcy2D
from physicsnemo.metrics.general.mse import mse
from physicsnemo.models.fno.fno import FNO

model = FNO(
    in_channels=1, out_channels=1,
    dimension=2, latent_channels=32,
    num_fno_layers=4, num_fno_modes=12,
    padding=5,
).to("cuda")

optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
dataloader = Darcy2D(resolution=256, batch_size=64)

for batch in dataloader:
    pred = model(batch["permeability"])
    loss = mse(pred, batch["darcy"])
    loss.backward()
    optimizer.step()

Quick Command

# Install PhysicsNeMo
pip install nvidia-physicsnemo

# Install with all optional dependencies
pip install nvidia-physicsnemo[all]

# Install PhysicsNeMo-Sym (physics-informed constraints)
pip install Cython
pip install nvidia-physicsnemo-sym --no-build-isolation

# Run with Docker container
docker pull nvcr.io/nvidia/physicsnemo/physicsnemo:latest
docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
  --runtime nvidia -v ${PWD}:/workspace \
  -it --rm nvcr.io/nvidia/physicsnemo/physicsnemo:latest bash

# Distributed training
torchrun --nproc_per_node=4 train.py

# Clone training recipes
git clone https://github.com/NVIDIA/physicsnemo.git

Quick Reference

Built-in Model Architectures

ModelModuleDomain
FNOphysicsnemo.models.fno.fno.FNOGeneral PDE solving
AFNOphysicsnemo.models.afno.afno.AFNOWeather forecasting (FourCastNet)
GraphCastphysicsnemo.models.graphcastGlobal weather prediction
MeshGraphNetphysicsnemo.models.meshgraphnetMesh-based simulation
X-MeshGraphNetphysicsnemo.models.meshgraphnetLarge-scale mesh (100M+ cells)
Hybrid MeshGraphNetphysicsnemo.models.meshgraphnetComplex boundary conditions
SFNOphysicsnemo.models.sfnoWeather on lat-lon grids
DeepONetphysicsnemo.models.deeponetOperator learning (branch+trunk)
Pix2Pixphysicsnemo.models.pix2pixImage-to-image physics
DLWPphysicsnemo.models.dlwpWeather prediction
DoMINOphysicsnemo.models.dominoAerodynamics, point-cloud CFD
Transolverphysicsnemo.models.transolverGeneral PDE, fp8 on Hopper
DPOTphysicsnemo.models.dpotPre-trained operator transformer
SRResNetphysicsnemo.models.srrnSuper-resolution
RNNphysicsnemo.models.rnnTransient physics
FigConvNet/UNetphysicsnemo.models.figconvnetExternal aerodynamics
3D UNetphysicsnemo.models.unetVoxel-based 3D simulation
FullyConnectedphysicsnemo.models.mlp.fully_connectedGeneral MLP
Diffusion UNetsphysicsnemo.models.diffusion_unetsDownscaling, FWI, topology opt

Core Utilities

ComponentImportPurpose
Distributedphysicsnemo.distributed.DistributedManagerMulti-GPU orchestration
ShardTensorphysicsnemo.distributed.scatter_tensorDomain parallelism
CUDA Graphsphysicsnemo.utils.StaticCaptureTrainingTraining optimization
PhysicsInformerphysicsnemo.utils.physics_informer.PhysicsInformerPDE residual computation
Metricsphysicsnemo.metrics.general.mseLoss computation
Datapipesphysicsnemo.datapipes.benchmarks.*Scientific data loading
Curatorphysicsnemo_curator.etl.*GPU-accelerated data curation
Modulephysicsnemo.models.module.ModuleBase model with checkpoint support
Warp Neighborsphysicsnemo.utils.neighborsGPU ball query for point clouds
Loggingphysicsnemo.launch.logging.LaunchLoggerMLflow / W&B integration
Active Learningphysicsnemo.active_learning.driver.DriverIterative model improvement

Hardware Requirements

GPU FamilyExamplesNotes
BlackwellB100, RTX PRO 6000Latest, full support
HopperH100Recommended, fp8 via TE
Ada LovelaceRTX 40xxSupported
AmpereA100, A30, A6000Recommended for training
TuringT4Inference focused
ARM64—Supported

OS: Ubuntu 24.04 (WSL supported). Python >= 3.10. Docker: nvcr.io/nvidia/physicsnemo/physicsnemo:<tag>

Domain-Specific Packages

PackagePurposeInstall
PhysicsNeMo-CFDCFD inference (DoMINO NIM)physicsnemo.cfd
PhysicsNeMo CuratorData curation ETLphysicsnemo-curator
Earth2StudioWeather/climate inferenceearth2studio

Example Applications

ApplicationDomainKey Models
FourCastNet (AFNO)Global weatherAFNO at 0.25deg resolution
CorrDiffKm-scale downscalingDiffusion + multi-diffusion
StormCastConvection-allowing weatherDiffusion UNet, EDM sampler
GraphCastMedium-range weatherDistributed GNN
DoMINO AerodynamicsExternal CFDMulti-scale neural operator
XAeroNetExternal aerodynamicsSurface + volume prediction
Crash DynamicsStructural mechanicsX-MeshGraphNet (v25.11)
Datacenter ThermalDigital twin3D UNet, physics-informed FD
FWI GeophysicsSubsurface inversionDiffusion + DPS
TopoDiffDesign optimizationDiffusion + manufacturability
Darcy FlowCFD benchmarkFNO, Transolver, DeepONet
Blood Flow 1DHealthcareMeshGraphNet reduced-order
HelmholtzWave equationsPhysicsNeMo-Sym PINN

When to Apply

Reference these guidelines when:

  • Training neural operators (FNO, AFNO, DoMINO) for PDE solving
  • Building weather/climate AI models (GraphCast, CorrDiff, StormCast)
  • Creating physics-informed neural networks (PINNs)
  • Scaling scientific AI training to multi-GPU clusters
  • Developing AI surrogates for CFD, structural mechanics, or engineering simulation
  • Converting PyTorch models to PhysicsNeMo for optimization
  • Deploying physics-AI models via NIM or Earth2Studio
  • Curating engineering datasets with GPU-accelerated ETL pipelines
  • Integrating external kernels (cuML, Warp) with torch.compile
  • Migrating GNN code from DGL to PyTorch Geometric

Priority-Ordered Guidelines

PriorityCategoryImpactPrefix
1Training RecipesCRITICALtraining-*
2Model ArchitecturesCRITICALmodels-*
3Distributed TrainingHIGHdistributed-*
4Data PipelinesHIGHdata-*
5Advanced FeaturesHIGHadvanced-*
6DeploymentMEDIUMdeployment-*
7Physics ConstraintsMEDIUMphysics-*

References

Full documentation with code examples in references/:

FileImpactDescription
training-recipes.mdCRITICALFNO training, CUDA graphs, optimizer setup, loss functions
models-and-architectures.mdCRITICAL18+ architectures: GNNs, transformers, neural operators, diffusion, voxel
distributed-training.mdHIGHDistributedManager, DDP, multi-node, torchrun patterns
data-pipelines.mdHIGHDatapipes, normalization, Curator ETL, ERA5 download
advanced-features.mdHIGHPhysicsInformer, torch.compile, Warp/TE layers, DGL→PyG, active learning
deployment.mdMEDIUMCheckpointing, DoMINO NIM, Earth2Studio, ONNX export
physics-constraints.mdMEDIUMPhysicsNeMo-Sym, PINNs, custom physics losses, Key API

Problem -> Skill Mapping

ProblemStart With
Train a neural operatortraining-recipes.md
Choose a model architecturemodels-and-architectures.md
Scale to multiple GPUsdistributed-training.md
Load scientific datadata-pipelines.md
Deploy trained modeldeployment.md
Add physics constraintsphysics-constraints.md
Build weather AI modelmodels-and-architectures.md -> training-recipes.md
Convert PyTorch modelmodels-and-architectures.md
Optimize training speedtraining-recipes.md -> distributed-training.md
Add physics loss to data modeladvanced-features.md
Active learning loopadvanced-features.md
Domain decompositionadvanced-features.md
Experiment trackingadvanced-features.md
Evaluate weather modeladvanced-features.md
Curate engineering datasetsdata-pipelines.md
Run DoMINO NIM inferencedeployment.md
Run weather forecast with AIdeployment.md
Integrate cuML/Warp with torch.compileadvanced-features.md
Migrate DGL to PyGadvanced-features.md
Simulate 100M+ cell meshmodels-and-architectures.md -> distributed-training.md
Topology optimizationmodels-and-architectures.md
Full waveform inversionmodels-and-architectures.md

Attribution

Based on NVIDIA PhysicsNeMo documentation and physicsnemo repository.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.