Differentiable programming has facilitated numerous methodological advances in scientific computing. Physics engines supporting automatic differentiation have simpler code, accelerating the development process and reducing the maintenance burden. Furthermore, fully-differentiable simulation tools enable direct evaluation of challenging derivatives - including those directly related to properties measurable by experiment - that are conventionally computed with finite difference methods. Here, we investigate automatic differentiation in the context of orbital-free density functional theory (OFDFT) simulations of materials, introducing PROFESS-AD. Its automatic evaluation of properties derived from first derivatives, including functional potentials, forces, and stresses, facilitates the development and testing of new density functionals, while its direct evaluation of properties requiring higher-order derivatives, such as bulk moduli, elastic constants, and force constants, offers more concise implementations compared to conventional finite difference methods. For these reasons, PROFESS-AD serves as an excellent prototyping tool and provides new opportunities for OFDFT.
TaylUR, an arbitrary-order diagonal automatic differentiation package for Fortran 95
我们提出了TaylUR,Fortran 95模块自动计算数值的复值函数的衍生物w.r.t.多个变量,每个变量的顺序任意,但不包括混合衍生物。算术运算符和Fortran内部函数被重载,以正确地作用于定义类型为“taylor”的对象,该类型将函数及其前几个导数w.r.t.用户自定义的独立变量。乘积和复合函数的导数使用莱布尼茨规则和Faa di Bruno公式计算。TaylUR大量使用运算符重载和其他面向对象的Fortran 95特性。
Automatic differentiation approach for reconstructing spectral functions with neural networks
Frankfurt Institute for Advanced Studies(法兰克福高等研究院);Xidian-FIAS International Joint Research Center(西电-法兰克福高等研究院国际联合研究中心);McGill University(麦吉尔大学);Stony Brook University(石溪大学)
FANTASY: User-Friendly Symplectic Geodesic Integrator for Arbitrary Metrics with Automatic Differentiation
我们提出了FANTASY(Finally A Numerical Trajectory Algorithm both Straightforward and sYmplectic),这是一个用Python编写的用户友好的开源辛测地线积分器。FANTASY被设计为“开箱即用”,除了度量和测地线的初始条件外,不需要用户提供任何东西。FANTASY使用自动微分有效地计算高达机器精度的导数,允许在任意空间(时间)中积分测地线,而无需用户手动输入Christoffel符号或任何其他度量导数。此外,FANTASY利用了一种将相空间加倍的哈密顿积分方案,其中粒子相空间的两个副本一起演化。这种技术允许一个集成方案,这是明确的和辛的,即使当哈密尔顿是不可分的。FANTASY预建有二阶和四阶格式,并且很容易扩展到高阶格式。FANTASY还包括一个自动雅可比计算器,允许自动完成坐标变换。