This project demonstrates a complete machine-learning interatomic potential (MLIP) workflow for molecular simulation using the revised MD17 (rMD17) ethanol dataset and the MACE framework.
The workflow covers:
rMD17 → data preparation → MACE training → energy/force evaluation → geometry optimization → molecular dynamics → NequIP comparison**
The primary objective was to understand and implement the practical workflow required to train and use an ML interatomic potential rather than to develop a new MLIP architecture.
A small NequIP pilot was additionally performed on the same general molecular MLIP workflow to provide an initial comparison between two established equivariant MLIP frameworks.
The revised MD17 ethanol dataset contains molecular geometries together with reference energies and atomic forces.
For the MACE workflow, one of the official rMD17 train/test splits was used:
- 1000 training structures
- 1000 test structures
- 9 atoms per ethanol molecule
- Energies originally provided in kcal/mol
- Forces originally provided in kcal/mol/Å
- Coordinates retained in Å
The reference energies and forces were converted to eV and eV/Å, respectively, for use with the MACE/ASE workflow.
This project uses the revised MD17 (rMD17) ethanol dataset.
The dataset is not included in this repository because the original dataset is externally hosted and contains large data files.
Please obtain the revised MD17 ethanol dataset from the original source and place the required files in this directory before running the data preparation notebooks. The notebooks document the expected data format, preprocessing steps, unit conversions, and train/test split used in this project.
Christensen, A. S. and von Lilienfeld, O. A. "On the role of gradients for machine learning of molecular energies and forces."
The exact dataset source and citation should be retained in the project documentation.
A MACE model was trained using:
- 64 hidden channels
- 2 interaction layers
- Float32 precision
- CPU training
- Batch size = 2
- 10 training epochs
- Seed = 123
- Average isolated-atom energy initialization
The best model occurred at epoch 9.
The final test-set performance was approximately:
| Property | Test performance |
|---|---|
| Energy RMSE | 40.4 meV/atom |
| Energy MAE | 40.4 meV/atom |
| Force RMSE | 0.0802 eV/Å |
| Force MAE | 0.0575 eV/Å |
The model therefore reproduced the reference energy and force landscape of the held-out ethanol configurations with moderate accuracy using a relatively small CPU-trained model.
The trained MACE potential was subsequently used as an ASE calculator for geometry optimization.
Starting from a test-set ethanol structure:
- Initial MACE energy: −4210.2124 eV
- Final optimized energy: −4210.5737 eV
- Energy change: −0.3613 eV
- Final maximum force: ≈0.0356 eV/Å
- Optimization converged within the saved BFGS trajectory
This demonstrates that the trained MLIP can be used not only for static energy and force prediction but also as a force provider for molecular geometry optimization.
A short NVT Langevin molecular-dynamics pilot was performed using the MACE potential.
- Target temperature: 300 K
- Time step: 0.5 fs
- Total simulation time: 100 fs
- 201 recorded structures
- Langevin thermostat
The temperature increased from 0 K to approximately 158.7 K during the short trajectory.
Because the simulation began from an optimized structure without initial velocities and was only 100 fs long, this trajectory is considered an MD workflow and stability demonstration rather than an equilibrated 300 K production simulation.
The trajectory was also analyzed in terms of potential energy, kinetic energy, total energy, temperature, and maximum force.
To complement the MACE workflow, a small NequIP pilot model was also trained and evaluated.
The NequIP model used:
- NequIP 0.19.1
- PyTorch 2.14.0
- e3nn 0.6.0
- CPU training
- 10 training epochs
- Approximately 45.7K trainable parameters
The final NequIP test-set metrics were:
| Property | NequIP performance |
|---|---|
| Energy MAE | 16.12 meV/atom |
| Energy RMSE | 17.82 meV/atom |
| Force MAE | 0.1241 eV/Å |
| Force RMSE | 0.1744 eV/Å |
| Energy maximum absolute error | 83.74 meV/atom |
| Force maximum absolute error | 3.134 eV/Å |
For the NequIP model, the energy values reported by the test metrics were converted from eV/atom to meV/atom for comparison with the MACE results.
The initial comparison is summarized below:
| Metric | MACE | NequIP |
|---|---|---|
| Energy RMSE (meV/atom) | 40.40 | 17.82 |
| Energy MAE (meV/atom) | 40.40 | 16.12 |
| Force RMSE (eV/Å) | 0.0802 | 0.1744 |
| Force MAE (eV/Å) | 0.0575 | 0.1241 |
The pilot results show an interesting difference between the two models:
- NequIP produced lower energy errors for this particular pilot.
- MACE produced lower force errors for this particular pilot.
These results should not be interpreted as evidence that one architecture is generally superior to the other. The runs were intended as workflow demonstrations and were not designed as a controlled benchmark with identical architectures, hyperparameters, training schedules, optimization procedures, and model-selection criteria. The numerical comparison and corresponding plots are saved in the project output directory.
The project demonstrates that an MLIP trained on a relatively small molecular dataset can be integrated into a standard atomistic simulation workflow.
The main results are:
-
Reference molecular energies and forces were successfully converted into an MLIP-compatible format.
-
A MACE model was trained on 1000 rMD17 ethanol structures.
-
The MACE model achieved:
- 40.4 meV/atom energy RMSE
- 40.4 meV/atom energy MAE
- 0.0802 eV/Å force RMSE
- 0.0575 eV/Å force MAE
-
The trained MACE potential was successfully used for force-based geometry optimization.
-
The optimized ethanol structure reached a final maximum force of approximately 0.0356 eV/Å.
-
The same MACE potential was successfully used for a short Langevin molecular-dynamics simulation.
-
A NequIP pilot was successfully trained and evaluated.
-
The initial MACE/NequIP comparison showed lower energy errors for NequIP and lower force errors for MACE under the tested conditions.
This project is intentionally a learning and workflow demonstration and has several limitations:
- Only one official rMD17 train/test split was used for the MACE workflow.
- The MACE training set contained only 1000 structures.
- The models were trained using relatively short training schedules.
- The MACE and NequIP models were not subjected to a rigorously controlled head-to-head benchmark.
- The training configurations, architectures, hyperparameters, and optimization settings were not identical between MACE and NequIP.
- Both workflows were CPU-based pilot calculations.
- No systematic hyperparameter optimization was performed.
- No learning-curve analysis was performed.
- The MD trajectory was only 100 fs and should not be interpreted as an equilibrated 300 K simulation.
- The project does not establish transferability to molecules outside the ethanol dataset.
- Long-timescale stability and energy conservation were not systematically investigated.
- The project does not establish production-level accuracy for molecular dynamics.
The reported test errors should therefore be interpreted in the context of the dataset size, training budget, and pilot nature of the study.
This project provided practical experience with the complete MLIP workflow, including:
- Molecular energy and force datasets
- rMD17 data handling
- Unit conversion for MLIP training
- ASE
Atomsstructures - MACE training
- NequIP training
- Energy and force validation
- Parity and error analysis
- Force-based geometry optimization
- MLIP-driven molecular dynamics
- Comparison of MLIP frameworks
- Reproducible project organization
- CPU-based MLIP workflows
More importantly, the project provided practical experience in connecting machine-learning models with atomistic simulation workflows, rather than treating model training as an isolated regression problem.
This project successfully implemented an end-to-end MLIP workflow for ethanol using the revised MD17 dataset. The MACE model was trained and evaluated for molecular energies and forces and was subsequently integrated with ASE for geometry optimization and molecular dynamics. A NequIP pilot was also completed to provide an initial comparison between two modern equivariant MLIP frameworks. For the tested pilot configurations, MACE showed better force prediction while NequIP showed better energy prediction. However, because the two models were not benchmarked under identical conditions, these results should be viewed as preliminary rather than as a definitive architecture comparison.
The project provides a practical foundation for future MLIP studies involving larger datasets, longer training schedules, systematic learning-curve analysis, controlled MACE/NequIP benchmarking, additional molecular systems, and more rigorous molecular-dynamics simulations.