Expand description
§ruqu-qgat-mol
Quantum Graph Attention for Molecules - combines quantum mechanics with graph attention networks for molecular simulation.
This crate provides a Tier 1 capability (Score 88) for molecular property prediction using quantum-aware graph neural networks.
§Features
- Molecular Graph Representation: Atoms as nodes with quantum orbital features, bonds as edges with quantum coupling strengths.
- Quantum Orbital Encoder: Slater-type orbital approximations and electron density representations.
- Quantum Graph Attention: Multi-head attention with quantum-aware attention scores based on orbital overlap.
- Molecular Property Prediction: Energy, HOMO-LUMO gap, dipole moment, and other properties.
§Quick Start
use ruqu_qgat_mol::{
graph::MolecularGraph,
orbital::OrbitalEncoder,
attention::QuantumGraphAttention,
predictor::{MolecularPredictor, PredictorConfig, PropertyType},
};
// Create a water molecule
let water = MolecularGraph::water();
// Predict molecular properties
let config = PredictorConfig::default();
let predictor = MolecularPredictor::new(config);
let energy = predictor.predict(&water, PropertyType::Energy).unwrap();
let gap = predictor.predict(&water, PropertyType::HomoLumoGap).unwrap();
let dipole = predictor.predict(&water, PropertyType::DipoleMoment).unwrap();
println!("Water molecule:");
println!(" Energy: {:.2} eV", energy);
println!(" HOMO-LUMO gap: {:.2} eV", gap);
println!(" Dipole moment: {:.2} D", dipole);§Pre-built Molecules
The crate provides several common molecules for testing:
use ruqu_qgat_mol::graph::MolecularGraph;
let water = MolecularGraph::water(); // H2O
let methane = MolecularGraph::methane(); // CH4
let benzene = MolecularGraph::benzene(); // C6H6
let ethane = MolecularGraph::ethane(); // C2H6
let ethylene = MolecularGraph::ethylene(); // C2H4
let acetylene = MolecularGraph::acetylene(); // C2H2
let ammonia = MolecularGraph::ammonia(); // NH3
let co2 = MolecularGraph::carbon_dioxide(); // CO2§WASM Support
Enable the wasm feature for WebAssembly support:
[dependencies]
ruqu-qgat-mol = { version = "0.1", features = ["wasm"] }§Architecture
The prediction pipeline consists of:
- Orbital Encoder: Converts atoms to quantum feature vectors
- QGAT Network: Multi-layer quantum graph attention
- Graph Pooling: Aggregates node features to graph representation
- MLP Head: Predicts target properties
Atoms -> OrbitalEncoder -> QGAT Layers -> Pooling -> MLP -> PropertyRe-exports§
pub use attention::GraphPooling;pub use attention::PoolingMethod;pub use attention::QGATConfig;pub use attention::QGATNetwork;pub use attention::QGATNetworkConfig;pub use attention::QuantumGraphAttention;pub use error::AttentionError;pub use error::GraphError;pub use error::OrbitalError;pub use error::PredictionError;pub use error::QgatMolError;pub use error::Result;pub use graph::Atom;pub use graph::Bond;pub use graph::BondType;pub use graph::Element;pub use graph::Hybridization;pub use graph::MolecularGraph;pub use orbital::OrbitalEncoder;pub use orbital::OrbitalEncoderConfig;pub use orbital::OrbitalType;pub use orbital::SlaterOrbital;pub use predictor::BatchPredictor;pub use predictor::DipoleMomentCalculator;pub use predictor::HomoLumoCalculator;pub use predictor::MolecularPredictor;pub use predictor::PredictorConfig;pub use predictor::PropertyPredictions;pub use predictor::PropertyType;pub use predictor::ReferenceEnergies;
Modules§
- attention
- Quantum Graph Attention Layer for molecular graphs.
- error
- Error types for the ruqu-qgat-mol crate.
- graph
- Molecular graph representation with quantum features.
- orbital
- Quantum orbital encoder for molecular atoms.
- predictor
- Molecular property predictor using quantum graph attention.
Constants§
- VERSION
- Library version