One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill pytorch-physics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytorch-physics
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/01-physics/pytorch-physics
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill pytorch-physics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch>=2.0, deepxde>=1.9, torchdiffeq>=0.2, numpy>=1.24, matplotlib>=3.7.

What problem does it solve?

This Skill helps you model and learn physical systems governed by differential equations, turning scarce or noisy observations into solutions constrained by physics.

Core Features & Use Cases

  • Physics-Informed Neural Networks (PINNs): Enforce PDE residuals and boundary/initial conditions using automatic differentiation in PyTorch.
  • Neural ODEs: Learn continuous-time dynamics from irregular time-series data and forecast future states.
  • Data-Driven Force-Field Learning: Learn potential energy and derive conservative forces (e.g., energy conservation via F = -∇E).
  • Use Case: Infer unknown PDE coefficients from noisy measurements (e.g., identify α in a diffusion/heat equation) and validate against known analytical or baseline solutions.

Quick Start

Use the pytorch-physics skill to train a PINN to solve a heat equation and compare the learned solution against the analytical ground truth using PyTorch autograd.

Frequently Asked Questions about pytorch-physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I solve PDEs with physics-informed neural networks in PyTorch?

Solve PDEs with physics-informed neural networks by enforcing residuals and boundary conditions using PyTorch autograd. This Skill trains models constrained by governing equations to find forward solutions from noisy or scarce data.

Can I learn continuous-time dynamics from irregular time-series data using Neural ODEs?

Learn continuous-time dynamics from irregular time-series data using Neural ODEs to forecast future states. This Skill applies continuous-time dynamics learning to model and predict complex temporal evolution.

How does force-field learning derive conservative forces from potential energy data?

Force-field learning derives conservative forces by estimating potential energy and computing its gradient. This Skill uses PyTorch autograd to calculate forces like F = -∇E for data-driven simulation tasks.

What is the best way to identify unknown PDE coefficients from noisy measurements?

Identify unknown PDE coefficients from noisy measurements by running inverse parameter identification. This Skill trains physics-informed models to infer parameters like diffusion coefficients and validate them against analytical solutions.

Do I need DeepXDE and torchdiffeq to perform scientific machine learning tasks?

You need DeepXDE and torchdiffeq to perform scientific machine learning tasks as they provide essential physics DL tooling compatible with PyTorch. These dependencies support training loops for PINNs and Neural ODEs.

Can PyTorch autograd compute first and second order derivatives for inverse problems?

PyTorch autograd computes first and second order derivatives required for inverse problems and PDE residuals. This Skill leverages automatic differentiation to enforce governing equations and identify unknown physical parameters.