|
133 | 133 | - [npart\_sto](#npart_sto) |
134 | 134 | - [Geometry relaxation](#geometry-relaxation) |
135 | 135 | - [relax\_method](#relax_method) |
136 | | - - [relax\_new](#relax_new) |
137 | 136 | - [relax\_scale\_force](#relax_scale_force) |
138 | 137 | - [relax\_nmax](#relax_nmax) |
139 | 138 | - [relax\_cg\_thr](#relax_cg_thr) |
|
1605 | 1604 | ### relax_method |
1606 | 1605 |
|
1607 | 1606 | - **Type**: Vector of string |
1608 | | -- **Description**: The methods to do geometry optimization. The available algorithms depend on the relax_new setting. |
| 1607 | +- **Description**: The method used for geometry optimization. |
1609 | 1608 |
|
1610 | 1609 | First element (algorithm selection): |
1611 | 1610 |
|
1612 | | - - cg: Conjugate gradient (CG) algorithm. Available for both relax_new = True (default, simultaneous optimization) and relax_new = False (nested optimization). See relax_new for implementation details. |
1613 | | - - bfgs: Broyden–Fletcher–Goldfarb–Shanno (BFGS) quasi-Newton algorithm. Only available when relax_new = False. |
1614 | | - - lbfgs: Limited-memory BFGS algorithm, suitable for large systems. Only available when relax_new = False. |
1615 | | - - cg_bfgs: Mixed method starting with CG and switching to BFGS when force convergence reaches relax_cg_thr. Only available when relax_new = False. |
1616 | | - - sd: Steepest descent algorithm. Only available when relax_new = False. Not recommended for production use. |
1617 | | - - fire: Fast Inertial Relaxation Engine method, a molecular-dynamics-based relaxation algorithm. Use by setting calculation to md and md_type to fire. Ionic velocities must be set in STRU file. See fire for details. |
| 1611 | + - cg: Conjugate gradient (CG) algorithm. |
| 1612 | + - bfgs: Broyden–Fletcher–Goldfarb–Shanno (BFGS) quasi-Newton algorithm. |
| 1613 | + - lbfgs: Limited-memory BFGS algorithm, suitable for large systems. |
| 1614 | + - cg_bfgs: Mixed method starting with CG and switching to BFGS when force convergence reaches relax_cg_thr. |
| 1615 | + - sd: Steepest descent algorithm. Not recommended for production use. |
1618 | 1616 |
|
1619 | | - Second element (BFGS variant, only when first element is bfgs): |
| 1617 | + Optional second element: |
1620 | 1618 |
|
1621 | | - - 1: Traditional BFGS that updates the Hessian matrix B and then inverts it. |
1622 | | - - 2 or omitted: Default BFGS that directly updates the inverse Hessian (recommended). |
| 1619 | + - cg 1: First optimize ionic positions at fixed cell, then update the cell, and repeat. |
| 1620 | + - cg 2 or omitted: Simultaneously optimize ionic positions and cell parameters with line search (recommended). |
| 1621 | + - bfgs 1: Traditional BFGS that updates the Hessian matrix B and then inverts it. |
| 1622 | + - bfgs 2 or omitted: Default BFGS that directly updates the inverse Hessian (recommended). |
1623 | 1623 |
|
1624 | | - > Note: In the 3.10-LTS version, the type of this parameter is std::string. It can be set to "cg", "bfgs", "cg_bfgs", "bfgs_trad", "lbfgs", "sd", "fire". |
1625 | | -- **Default**: cg 1 |
1626 | | - |
1627 | | -### relax_new |
| 1624 | + The second element is not accepted by other methods. |
1628 | 1625 |
|
1629 | | -- **Type**: Boolean |
1630 | | -- **Description**: Controls which implementation of geometry relaxation to use. At the end of 2022, a new implementation of the Conjugate Gradient (CG) method was introduced for relax and cell-relax calculations, while the old implementation was kept for backward compatibility. |
1631 | | - |
1632 | | - |
1633 | | - - True (default): Use the new CG implementation with the following features: |
1634 | | - - Simultaneous optimization of ionic positions and cell parameters (for cell-relax) |
1635 | | - - Line search algorithm for step size determination |
1636 | | - - Only CG algorithm is available (relax_method must be cg) |
1637 | | - - Supports advanced cell constraints: fixed_axes = "shape", "volume", "a", "b", "c", etc. |
1638 | | - - Supports fixed_ibrav to maintain lattice type |
1639 | | - - More efficient for variable-cell relaxation |
1640 | | - - Step size controlled by relax_scale_force |
1641 | | - |
1642 | | - - False: Use the old implementation with the following features: |
1643 | | - - Nested optimization procedure: ionic positions optimized first, then cell parameters (for cell-relax) |
1644 | | - - Multiple algorithms available: cg, bfgs, lbfgs, sd, cg_bfgs |
1645 | | - - Limited cell constraints: only fixed_axes = "volume" is supported |
1646 | | - - Traditional approach with separate ionic and cell optimization steps |
1647 | | -- **Default**: True |
| 1626 | + > Note: In the 3.10-LTS version, the type of this parameter is std::string. It can be set to "cg", "bfgs", "cg_bfgs", "bfgs_trad", "lbfgs", "sd", "fire". |
| 1627 | +- **Default**: cg 2 |
1648 | 1628 |
|
1649 | 1629 | ### relax_scale_force |
1650 | 1630 |
|
1651 | 1631 | - **Type**: Real |
1652 | | -- **Availability**: *Only used when relax_new set to True* |
| 1632 | +- **Availability**: *Only used when relax_method is cg 2* |
1653 | 1633 | - **Description**: The paramether controls the size of the first conjugate gradient step. A smaller value means the first step along a new CG direction is smaller. This might be helpful for large systems, where it is safer to take a smaller initial step to prevent the collapse of the whole configuration. |
1654 | 1634 | - **Default**: 0.5 |
1655 | 1635 |
|
|
1662 | 1642 | ### relax_cg_thr |
1663 | 1643 |
|
1664 | 1644 | - **Type**: Real |
1665 | | -- **Availability**: *Only used when relax_new = False and relax_method = cg_bfgs* |
| 1645 | +- **Availability**: *Only used when relax_method is cg_bfgs* |
1666 | 1646 | - **Description**: When relax_method is set to cg_bfgs, a mixed algorithm of conjugate gradient (CG) and Broyden–Fletcher–Goldfarb–Shanno (BFGS) is used. The ions first move according to the CG method, then switch to the BFGS method when the maximum force on atoms is reduced below this threshold. |
1667 | 1647 | - **Default**: 0.5 |
1668 | 1648 | - **Unit**: eV/Angstrom |
|
1691 | 1671 | ### relax_bfgs_w1 |
1692 | 1672 |
|
1693 | 1673 | - **Type**: Real |
1694 | | -- **Availability**: *Only used when relax_new = False and relax_method is bfgs or cg_bfgs* |
| 1674 | +- **Availability**: *Only used when relax_method is bfgs or cg_bfgs* |
1695 | 1675 | - **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the sufficient decrease condition (c1 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177. |
1696 | 1676 | - **Default**: 0.01 |
1697 | 1677 |
|
1698 | 1678 | ### relax_bfgs_w2 |
1699 | 1679 |
|
1700 | 1680 | - **Type**: Real |
1701 | | -- **Availability**: *Only used when relax_new = False and relax_method is bfgs or cg_bfgs* |
| 1681 | +- **Availability**: *Only used when relax_method is bfgs or cg_bfgs* |
1702 | 1682 | - **Description**: Controls the Wolfe condition for the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm used in geometry relaxation. This parameter sets the curvature condition (c2 in Wolfe conditions). For more information, see Phys. Chem. Chem. Phys., 2000, 2, 2177. |
1703 | 1683 | - **Default**: 0.5 |
1704 | 1684 |
|
1705 | 1685 | ### relax_bfgs_rmax |
1706 | 1686 |
|
1707 | 1687 | - **Type**: Real |
1708 | | -- **Availability**: *Only used when relax_new = False and relax_method is bfgs or cg_bfgs* |
| 1688 | +- **Availability**: *Only used when relax_method is bfgs or cg_bfgs* |
1709 | 1689 | - **Description**: Maximum allowed total displacement of all atoms during geometry optimization. The sum of atomic displacements can increase during optimization steps but cannot exceed this value. |
1710 | 1690 | - **Default**: 0.8 |
1711 | 1691 | - **Unit**: Bohr |
1712 | 1692 |
|
1713 | 1693 | ### relax_bfgs_rmin |
1714 | 1694 |
|
1715 | 1695 | - **Type**: Real |
1716 | | -- **Availability**: *Only used when relax_new = False and relax_method = bfgs 1 (traditional BFGS)* |
| 1696 | +- **Availability**: *Only used when relax_method is bfgs 1 (traditional BFGS)* |
1717 | 1697 | - **Description**: Minimum allowed total displacement of all atoms. When the total atomic displacement falls below this value and force convergence is not achieved, the calculation will terminate. Note: This parameter is not used in the default BFGS algorithm (relax_method = bfgs 2 or bfgs). |
1718 | 1698 | - **Default**: 1e-5 |
1719 | 1699 | - **Unit**: Bohr |
1720 | 1700 |
|
1721 | 1701 | ### relax_bfgs_init |
1722 | 1702 |
|
1723 | 1703 | - **Type**: Real |
1724 | | -- **Availability**: *Only used when relax_new = False and relax_method is bfgs or cg_bfgs* |
| 1704 | +- **Availability**: *Only used when relax_method is bfgs or cg_bfgs* |
1725 | 1705 | - **Description**: Initial total displacement of all atoms in the first BFGS step. This sets the scale for the initial movement. |
1726 | 1706 | - **Default**: 0.5 |
1727 | 1707 | - **Unit**: Bohr |
|
1758 | 1738 |
|
1759 | 1739 | - **Type**: String |
1760 | 1740 | - **Availability**: *Only used when calculation is set to cell-relax* |
1761 | | -- **Description**: Specifies which cell degrees of freedom are fixed during variable-cell relaxation. The available options depend on the relax_new setting: |
| 1741 | +- **Description**: Specifies which cell degrees of freedom are fixed during variable-cell relaxation. The available options depend on relax_method: |
1762 | 1742 |
|
1763 | | - When relax_new = True (default), all options are available: |
| 1743 | + With relax_method = cg 2 (default), all options are available: |
1764 | 1744 |
|
1765 | 1745 | - None: Default; all cell parameters can relax freely |
1766 | 1746 | - volume: Relaxation with fixed volume (allows shape changes) |
|
1771 | 1751 | - ab: Fix both a and b axes during relaxation |
1772 | 1752 | - ac: Fix both a and c axes during relaxation |
1773 | 1753 | - bc: Fix both b and c axes during relaxation |
| 1754 | + - abc: Fix all three lattice vectors during relaxation |
1774 | 1755 |
|
1775 | | - When relax_new = False, all options are now available: |
1776 | | - |
1777 | | - - None: Default; all cell parameters can relax freely |
1778 | | - - volume: Relaxation with fixed volume (allows shape changes). Volume is preserved by rescaling the lattice after each update. |
1779 | | - - shape: Fix shape but allow volume changes (hydrostatic pressure only). Stress tensor is replaced with isotropic pressure. |
1780 | | - - a, b, c, ab, ac, bc: Fix specific lattice vectors. Gradients for fixed vectors are set to zero. |
| 1756 | + With relax_method set to cg 1, bfgs, lbfgs, sd, or cg_bfgs, None and a, b, c, ab, ac, bc, abc are available. The shape and volume options require cg 2. |
1781 | 1757 |
|
1782 | | - > Note: For VASP users, see the ISIF correspondence table in the geometry optimization documentation. Both implementations now support all constraint types. |
| 1758 | + > Note: For VASP users, see the ISIF correspondence table in the geometry optimization documentation. |
1783 | 1759 | - **Default**: None |
1784 | 1760 |
|
1785 | 1761 | ### fixed_ibrav |
1786 | 1762 |
|
1787 | 1763 | - **Type**: Boolean |
1788 | | -- **Availability**: *Can be used with both relax_new = True and relax_new = False. A specific latname must be provided.* |
| 1764 | +- **Availability**: *Only used with relax_method = cg 2. A specific latname must be provided.* |
1789 | 1765 | - **Description**: - True: the lattice type will be preserved during relaxation. The lattice vectors are reconstructed to match the specified Bravais lattice type after each update. |
1790 | 1766 | - False: No restrictions are exerted during relaxation in terms of lattice type |
1791 | 1767 |
|
|
0 commit comments