> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revilico.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# RevRelax

> Optimizing 3D structures in stages, from a fast method to an accurate one

## Why Use This Engine?

Most of an optimization's cost goes into getting close to the right geometry, which a cheap method does well. Only the last steps and the energy need an accurate one. RevRelax passes each structure through a sequence of methods, each starting from the geometry the previous one produced, then scores the result once with a more accurate method still. That gives close to the accuracy of the expensive method at a fraction of its cost.

Use it to clean up a drawn or generated structure before another calculation, to get energies for a set of molecules at one level of theory, to confirm with frequencies that a structure is a true minimum and get its free energy, or to refine a guessed transition state.

## Background

Each preset fixes the optimization stages and the final energy method. The level of theory reads right to left: optimization starts with the rightmost method, and the leftmost gives the final single-point energy.

| Preset | Level of theory | Runs on |
| - | - | - |
| Reckless | GFN2-xTB // GFN-FF | CPU |
| Rapid | r²SCAN-D4/vDZP // GFN2-xTB | CPU |
| Careful | ωB97X-3c // r²SCAN-D4/vDZP | GPU |
| Meticulous | ωB97M-D3BJ/def2-TZVPPD // ωB97X-3c // r²SCAN-D4/vDZP | GPU |

## How It Works

| Stage | What happens |
| - | - |
| Optimize | Each stage relaxes the structure with its method, starting where the previous stage stopped. In transition-state mode, every stage searches for a first-order saddle point instead. |
| Frequencies | Optional, and always on in transition-state mode. A Hessian computed with the last optimization method gives the vibrations, the zero-point energy and the thermal correction at 298.15 K, with a quasi-RRHO treatment of vibrations below 100 cm⁻¹. A vibration of 10 cm⁻¹ or more counts as imaginary. |
| Final energy | One single point on the finished structure. The free energy is this energy plus the thermal correction. |

When a minimum comes out with an imaginary vibration, RevRelax pushes the structure along it and optimizes again, up to 3 times. Constrained structures are optimized once.

A solvent applies to the final energy, and to the optimization stages as well when **Optimize in the solvent too** is on. xTB stages use ALPB while optimizing and CPCM-X for a final energy. DFT stages use C-PCM. GFN-FF always runs in the gas phase.

Transition-state mode starts from your guess, so the guess must already be close to the saddle point. It runs with Rapid, Careful and Meticulous.

## Running the Engine

### Inputs

| Format | Molecules per file | Notes |
| - | - | - |
| SMILES (typed, or `.smi`) | One or more | One per line |
| `.csv` | One or more | A `smiles` column, with optional `name`, `charge` and `multiplicity` columns |
| `.sdf` | One or more | A 2D record gets a 3D structure built from its bonds. Missing hydrogens on a 3D record are added |
| `.xyz` | One or more | Multi-frame. Charge and multiplicity can go in a frame's comment line, as `charge=-1 multiplicity=1` |
| `.mol`, `.mol2`, `.pdb` | One | |

A SMILES gives one 3D shape, which RevRelax refines to the nearest minimum. That minimum may sit above the lowest-energy conformer; run [RevConformer](/docs/revconformer) first to find the lowest. A SMILES holding more than one molecule, such as a salt, is listed as failed with the reason; submit each component on its own.

Up to 50 molecules per run, from files up to 10 MB, with elements H to Rn. Molecules can have up to 200 atoms with Reckless and Rapid, 100 with Careful and 40 with Meticulous, counting hydrogens. A larger molecule is refused at submission, with its position in the input and the limit.

| Parameter | Default | Description |
| - | - | - |
| Name | Optional | A name for the run |
| Molecules | Required | SMILES or structure file, formats above |
| Preset | Rapid | Reckless, Rapid, Careful or Meticulous |
| Solvent | None | Water, methanol, ethanol, acetonitrile, acetone, DMSO, chloroform, dichloromethane, THF, toluene, benzene |
| Optimize in the solvent too | Off | Applies the solvent to the optimization stages as well as the final energy |
| Frequencies | Off | Vibrations, zero-point energy and free energy |
| Find a transition state | Off | One uploaded 3D structure, with Rapid, Careful or Meticulous. Frequencies are always computed |
| Constraints | None | One uploaded 3D structure, with Find a transition state off. Hold a distance, angle or dihedral, or freeze atoms. Pick the atoms in the 3D view or type their numbers, counting from 1. A blank value holds the coordinate as uploaded |
| Charge, Multiplicity | From structure | One molecule only. Otherwise each molecule takes its own formal charges and unpaired electrons, or the lowest spin its electrons allow |
| Runtime Limit (Credits) | No limit | Optional credit cap. The run stops when it is reached |

## Outputs

The results table lists one row per molecule in input order, with its status and final energy. When frequencies are computed, it also shows the free energy and the number of imaginary vibrations. A count other than 0 for a minimum, or 1 for a transition state, is highlighted. Select a molecule to see each stage's energy, steps and convergence, its frequencies, any notes, and the structure in 3D.

A molecule that fails, from an unreadable SMILES, a charge and multiplicity that do not fit, or a failed optimization, is listed with its reason, and the other molecules carry on. One that failed part-way shows the last structure it reached.

**Download** gives one zip with these files:

| File | Contents |
| - | - |
| `result.json` | The full result: every stage's energy and structure, and every vibrational frequency |
| `summary.csv` | One row per molecule, with its status, final energy, convergence and notes. Free energy and imaginary vibrations are included when frequencies are computed |
| `optimized.sdf` | Every finished structure with its bonds, and its energies as SD fields |
| `optimized.xyz` | The same structures as multi-frame XYZ |
| `structures/N.xyz` | The structure of the molecule at input position N |
| `report.txt` | A plain-text summary |

## Reading the Result

Energies are absolute, in Hartree. Compare them between structures with the same atoms, such as conformers, isomers, or a reactant and its transition state, run with the same preset.

A minimum that still has an imaginary vibration after 3 pushes is flagged in its notes. The Imaginary column shows how many pushes were needed. A constrained structure stays fixed along its held coordinates, so imaginary vibrations along them are expected, and its free energy is left out. A transition state should have exactly one, and any other count is noted.

A stage that reaches its step limit before converging is noted, and the next stage continues from where it stopped. When that was the last stage, the final structure may need more steps to settle.

## Interactive Results Viewer

Two worked examples. Ibuprofen is run with every preset from the same starting structure: Reckless, Rapid and Careful each optimize it in one stage, and Meticulous in two, with r²SCAN-D4/vDZP and then ωB97X-3c. The Claisen rearrangement is a transition-state search from one guess with Rapid and with Careful, and both end with exactly one imaginary vibration, at 494i cm⁻¹ and 438i cm⁻¹.

Pick an example, then a preset, and switch the 3D view between the input, each stage's structure and the final structure.

<iframe src="https://main.d3pyklf85pezb5.amplifyapp.com/relax/?data_url=/data/relax/demo.json" title="RevRelax interactive results viewer" width="100%" height="650px" style={{ border: "1px solid #e5e7eb", borderRadius: "12px" }} allow="clipboard-write" loading="lazy" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.