Pub Date : 2025-03-17DOI: 10.1016/j.cpc.2025.109580
Christian Sendlinger , Jonas Kellerer , Felix Spanier
A new parallelized simulation code is presented, which uses a Monte Carlo method to determine particle spectra in the KATRIN source. Reaction chains are generated from the decay of tritium within the source. The code includes all relevant processes: elastic scattering, ionization, excitation (electric, vibrational, rotational), recombination and various clustering processes. The main emphasis of the code is the calculation of particle spectra and particle densities and currents at specific points within the source. It features a new technique to determine these quantities. It also calculates target fields for the interaction of particles with each other as it is needed for recombination processes.
The code has been designed for the KATRIN experiment but is easily adaptable for other tritium based experiments like Project 8. Geometry and background tritium gas flow can be given as user input.
The code is parallelized using MPI and writes output using HDF5. Input to the simulation is read from a JSON description.
Program summary
Program Title: KARL - KAtrin WGTS electRon and ion spectrum Monte CarLo
CPC Library link to program files:https://doi.org/10.17632/5bj3vwc6rg.1
Licensing provisions: GNU Public License v3
Programming language: C++
External routines/libraries: C++ compiler (tested with g++ 8.2 and 9.4.0), MPI 1.1 (tested with OpenMPI 3.1), HDF5 with support for parallel I/O (tested with version 1.10.0), Blitz++ (tested with version 1.0.2), Jansson (tested with version 2.12 and 2.13)
Nature of problem: In the KATRIN experiment (and other experiments alike that feature large vessels filled with tritium) electrons are created from beta decay. These electrons interact with the ambient gas to produce secondary electrons through ionization. Subsequent processes include excitation, secondary ionization and collisions. The resulting electron and ion differential energy spectrum at various positions is relevant for further plasma analysis, and the current of charged particles to the ends of the experiments is an observable.
Solution method: Semi-classical Monte Carlo.
Additional comments including restrictions and unusual features: The geometry of the experiment is currently limited to the KATRIN experiment, but this may easily be changed. The configuration is stored in JSON files.
{"title":"KARL - a Monte Carlo model for atomic and molecular processes in the tritium atmosphere of the KATRIN experiment","authors":"Christian Sendlinger , Jonas Kellerer , Felix Spanier","doi":"10.1016/j.cpc.2025.109580","DOIUrl":"10.1016/j.cpc.2025.109580","url":null,"abstract":"<div><div>A new parallelized simulation code is presented, which uses a Monte Carlo method to determine particle spectra in the KATRIN source. Reaction chains are generated from the decay of tritium within the source. The code includes all relevant processes: elastic scattering, ionization, excitation (electric, vibrational, rotational), recombination and various clustering processes. The main emphasis of the code is the calculation of particle spectra and particle densities and currents at specific points within the source. It features a new technique to determine these quantities. It also calculates target fields for the interaction of particles with each other as it is needed for recombination processes.</div><div>The code has been designed for the KATRIN experiment but is easily adaptable for other tritium based experiments like Project 8. Geometry and background tritium gas flow can be given as user input.</div><div>The code is parallelized using MPI and writes output using HDF5. Input to the simulation is read from a JSON description.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> KARL - <strong>KA</strong>trin WGTS elect<strong>R</strong>on and ion spectrum Monte Car<strong>L</strong>o</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/5bj3vwc6rg.1</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GNU Public License v3</div><div><em>Programming language:</em> C++</div><div><em>External routines/libraries:</em> C++ compiler (tested with g++ 8.2 and 9.4.0), MPI 1.1 (tested with OpenMPI 3.1), HDF5 with support for parallel I/O (tested with version 1.10.0), Blitz++ (tested with version 1.0.2), Jansson (tested with version 2.12 and 2.13)</div><div><em>Nature of problem:</em> In the KATRIN experiment (and other experiments alike that feature large vessels filled with tritium) electrons are created from beta decay. These electrons interact with the ambient gas to produce secondary electrons through ionization. Subsequent processes include excitation, secondary ionization and collisions. The resulting electron and ion differential energy spectrum at various positions is relevant for further plasma analysis, and the current of charged particles to the ends of the experiments is an observable.</div><div><em>Solution method:</em> Semi-classical Monte Carlo.</div><div><em>Additional comments including restrictions and unusual features:</em> The geometry of the experiment is currently limited to the KATRIN experiment, but this may easily be changed. The configuration is stored in JSON files.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109580"},"PeriodicalIF":7.2,"publicationDate":"2025-03-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143644199","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-14DOI: 10.1016/j.cpc.2025.109581
Nicolas Pascal Guido Müller , Roman Vetter
<div><div>We present PolyMorph, a lightweight standalone C++ program that extends its predecessor PolyHoop by a finite-difference solver for multi-component reaction-advection-diffusion equations. PolyMorph simulates two integral parts of tissue morphogenesis in two dimensions: 1) the mechanics of cellular deformation, growth and proliferation, and 2) transport and reaction of an arbitrary number of chemical species. Both of these components are bidirectionally coupled, allowing cells to base their behavior on local information on concentrations and flow, and allowing the chemical transport and reaction kinetics to depend on spatial information such as the local cell type. This bidirectional feedback makes PolyMorph a versatile tool to study a variety of cellular morphogenetic processes such as chemotaxis, cell sorting, tissue patterning with morphogen gradients, Turing patterning, and diffusion- or supply-limited growth with sub-cellular resolution.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> PolyMorph</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/4jscxhkd2s.2</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> BSD 3-clause</div><div><em>Programming language:</em> C++11</div><div><em>Supplementary material:</em> Figure 1</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 299 (2024) 109128, <span><span>https://doi.org/10.1016/j.cpc.2024.109128</span><svg><path></path></svg></span></div><div><em>Does the new version supersede the previous version?:</em> No</div><div><em>Nature of problem:</em> In tissue development and disease, morphogenesis and cell fate determination depends on mechanical processes as well as chemical signaling. PolyMorph couples the Newtonian mechanics of deformable cells (including growth and proliferation) in 2D with a customizable set of reaction-advection-diffusion equations to simulate problems that require an integrated approach with chemical-mechanical interactions. Typical use cases include the patterning of epithelial tissues with chemical signals (e.g., morphogen gradients or the Turing mechanism), chemotaxis and cell migration, wound healing, diffusion- or nutrition-limited growth, regulatory network dynamics in a spatial cellular environment, and other problems in tissue self-organization. PolyMorph enables the numerical solution of such problems with bidirectional feedback between mechanics and chemistry, in large monolayer tissues and with an arbitrary number of interacting species.</div><div><em>Solution method:</em> The off-lattice polygonal representation of cell boundaries in PolyHoop [1] is coupled to a lattice representation of diffusing chemical reactants. The reaction-advection-diffusion problem is solved with the finite difference method using the standard 5-point central difference stencil, and explicitly integrated in time. A scatter-gather approach inspired by the particle-in-ce
{"title":"PolyMorph: Extension of PolyHoop for tissue morphogenesis coupled to chemical signaling","authors":"Nicolas Pascal Guido Müller , Roman Vetter","doi":"10.1016/j.cpc.2025.109581","DOIUrl":"10.1016/j.cpc.2025.109581","url":null,"abstract":"<div><div>We present PolyMorph, a lightweight standalone C++ program that extends its predecessor PolyHoop by a finite-difference solver for multi-component reaction-advection-diffusion equations. PolyMorph simulates two integral parts of tissue morphogenesis in two dimensions: 1) the mechanics of cellular deformation, growth and proliferation, and 2) transport and reaction of an arbitrary number of chemical species. Both of these components are bidirectionally coupled, allowing cells to base their behavior on local information on concentrations and flow, and allowing the chemical transport and reaction kinetics to depend on spatial information such as the local cell type. This bidirectional feedback makes PolyMorph a versatile tool to study a variety of cellular morphogenetic processes such as chemotaxis, cell sorting, tissue patterning with morphogen gradients, Turing patterning, and diffusion- or supply-limited growth with sub-cellular resolution.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> PolyMorph</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/4jscxhkd2s.2</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> BSD 3-clause</div><div><em>Programming language:</em> C++11</div><div><em>Supplementary material:</em> Figure 1</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 299 (2024) 109128, <span><span>https://doi.org/10.1016/j.cpc.2024.109128</span><svg><path></path></svg></span></div><div><em>Does the new version supersede the previous version?:</em> No</div><div><em>Nature of problem:</em> In tissue development and disease, morphogenesis and cell fate determination depends on mechanical processes as well as chemical signaling. PolyMorph couples the Newtonian mechanics of deformable cells (including growth and proliferation) in 2D with a customizable set of reaction-advection-diffusion equations to simulate problems that require an integrated approach with chemical-mechanical interactions. Typical use cases include the patterning of epithelial tissues with chemical signals (e.g., morphogen gradients or the Turing mechanism), chemotaxis and cell migration, wound healing, diffusion- or nutrition-limited growth, regulatory network dynamics in a spatial cellular environment, and other problems in tissue self-organization. PolyMorph enables the numerical solution of such problems with bidirectional feedback between mechanics and chemistry, in large monolayer tissues and with an arbitrary number of interacting species.</div><div><em>Solution method:</em> The off-lattice polygonal representation of cell boundaries in PolyHoop [1] is coupled to a lattice representation of diffusing chemical reactants. The reaction-advection-diffusion problem is solved with the finite difference method using the standard 5-point central difference stencil, and explicitly integrated in time. A scatter-gather approach inspired by the particle-in-ce","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109581"},"PeriodicalIF":7.2,"publicationDate":"2025-03-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143642219","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
In recent years, neural-network quantum states method in conjunction with the time-dependent variational Monte Carlo have been proposed to study the dynamics of many-body quantum systems. By interpreting the quantum dynamics problem as a ground state search of an effective Hamiltonian, we show that one can use stochastic reconfiguration (SR), a remarkable method that significantly boosts the efficiency and convergence of the variational training. Furthermore, since the vanilla SR method does not scale efficiently when the size of neural-network quantum states increases, we transfer to the study of time-dependent systems, or introduce altogether, three approaches that reduce the computational complexity of the SR method, and we compare their performance: Kronecker-factored approximate curvature (K-FAC), minimum-step stochastic reconfiguration (minSR), and sequential overlapping optimization (SOO). To demonstrate the generality of these approaches, we use both the restricted Boltzmann machine and the feed-forward neural network. We consider a titled Ising model and study the quantum quench from the paramagnetic to the anti-ferromagnetic phase. We show that the three approaches allow to use stochastic reconfigurations to describe the time evolution of a many-body quantum system using a neural network with more than 10000 parameters, which would be prohibitive otherwise. For systems up to 40 spins, we observe that minSR and SOO have similar performance and both provide better accuracy than K-FAC.
{"title":"Paths towards time evolution with larger neural-network quantum states","authors":"Wenxuan Zhang , Bo Xing , Xiansong Xu , Dario Poletti","doi":"10.1016/j.cpc.2025.109577","DOIUrl":"10.1016/j.cpc.2025.109577","url":null,"abstract":"<div><div>In recent years, neural-network quantum states method in conjunction with the time-dependent variational Monte Carlo have been proposed to study the dynamics of many-body quantum systems. By interpreting the quantum dynamics problem as a ground state search of an effective Hamiltonian, we show that one can use stochastic reconfiguration (SR), a remarkable method that significantly boosts the efficiency and convergence of the variational training. Furthermore, since the vanilla SR method does not scale efficiently when the size of neural-network quantum states increases, we transfer to the study of time-dependent systems, or introduce altogether, three approaches that reduce the computational complexity of the SR method, and we compare their performance: Kronecker-factored approximate curvature (K-FAC), minimum-step stochastic reconfiguration (minSR), and sequential overlapping optimization (SOO). To demonstrate the generality of these approaches, we use both the restricted Boltzmann machine and the feed-forward neural network. We consider a titled Ising model and study the quantum quench from the paramagnetic to the anti-ferromagnetic phase. We show that the three approaches allow to use stochastic reconfigurations to describe the time evolution of a many-body quantum system using a neural network with more than 10000 parameters, which would be prohibitive otherwise. For systems up to 40 spins, we observe that minSR and SOO have similar performance and both provide better accuracy than K-FAC.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109577"},"PeriodicalIF":7.2,"publicationDate":"2025-03-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143620349","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-12DOI: 10.1016/j.cpc.2025.109578
Lipei Du
This study presents the MATRICS framework (Modeling Aggregated Tensors for Relativistic Ion Collision Simulations) that implements modular workflows to enable parallel execution of particle generation, grid construction, and tensor calculations for heavy-ion collisions. It introduces an efficient approach to calculating the space-time distribution of the energy-momentum tensor and charge currents from discrete particles generated by transport models. By dynamically adjusting grid resolution based on particle density and clustering particles into representative super-particles, MATRICS optimizes computational efficiency while maintaining high physical accuracy. The framework can also provide a thermodynamic background for electromagnetic thermal emission calculations or serve as initial conditions for hydrodynamic evolution. It offers a powerful tool for exploring the thermodynamic properties of QCD matter at high baryon densities, making it well-suited for large-scale simulations in heavy-ion collision studies.
{"title":"Efficient calculation of thermodynamic properties of baryon-rich QCD matter from heavy-ion transport models","authors":"Lipei Du","doi":"10.1016/j.cpc.2025.109578","DOIUrl":"10.1016/j.cpc.2025.109578","url":null,"abstract":"<div><div>This study presents the MATRICS framework (Modeling Aggregated Tensors for Relativistic Ion Collision Simulations) that implements modular workflows to enable parallel execution of particle generation, grid construction, and tensor calculations for heavy-ion collisions. It introduces an efficient approach to calculating the space-time distribution of the energy-momentum tensor and charge currents from discrete particles generated by transport models. By dynamically adjusting grid resolution based on particle density and clustering particles into representative super-particles, MATRICS optimizes computational efficiency while maintaining high physical accuracy. The framework can also provide a thermodynamic background for electromagnetic thermal emission calculations or serve as initial conditions for hydrodynamic evolution. It offers a powerful tool for exploring the thermodynamic properties of QCD matter at high baryon densities, making it well-suited for large-scale simulations in heavy-ion collision studies.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109578"},"PeriodicalIF":7.2,"publicationDate":"2025-03-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143609774","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-10DOI: 10.1016/j.cpc.2025.109572
Xiaojun Lei , Tongxiang Gu , Xiaowen Xu , Hengbin An , Yanzhong Yao
The 2-D 3-T heat conduction equations can approximate the propagation of energy in the material, as well as the energy exchange process of electrons, ions and photons. In many cases, the computational time to solve these equations accounts for a large proportion (more than 80%) of that of the entire simulation of radiation hydrodynamics. PINNs is a promising way to solve partial differential equations (PDEs). Although numerical methods have been successful in solving 2-D 3-T heat conduction equations, the PINNs method also has some advantages, such as mesh-free, suitable to high dimension and complex domain problems. But the original PINNs cannot solve the 2-D 3-T heat conduction equations to a reasonable precision. This work aims to explore which techniques need to be added to PINNs and to what extent it can address the challenges posed by strong nonlinearity and multi-scale phenomena present in 2-D 3-T heat conduction equations. Hence, we adopt guaranteed positive constraint to the outputs so that the network can be trained, give a relatively large weight to the initial loss and Dirichlet boundary loss, take the logarithm of the initial loss, use transfer learning and Fourier feature embedding to improve accuracy. We call our improved approach 2D 3T PINNs. Numerical experiments show that the relative and the absolute error between the 2D 3T PINNs prediction and the reference solution is of the order of .
{"title":"2D 3T PINNs for solving 2-D 3-T heat conduction equations based on physics-informed neural networks","authors":"Xiaojun Lei , Tongxiang Gu , Xiaowen Xu , Hengbin An , Yanzhong Yao","doi":"10.1016/j.cpc.2025.109572","DOIUrl":"10.1016/j.cpc.2025.109572","url":null,"abstract":"<div><div>The 2-D 3-T heat conduction equations can approximate the propagation of energy in the material, as well as the energy exchange process of electrons, ions and photons. In many cases, the computational time to solve these equations accounts for a large proportion (more than 80%) of that of the entire simulation of radiation hydrodynamics. PINNs is a promising way to solve partial differential equations (PDEs). Although numerical methods have been successful in solving 2-D 3-T heat conduction equations, the PINNs method also has some advantages, such as mesh-free, suitable to high dimension and complex domain problems. But the original PINNs cannot solve the 2-D 3-T heat conduction equations to a reasonable precision. This work aims to explore which techniques need to be added to PINNs and to what extent it can address the challenges posed by strong nonlinearity and multi-scale phenomena present in 2-D 3-T heat conduction equations. Hence, we adopt guaranteed positive constraint to the outputs so that the network can be trained, give a relatively large weight to the initial loss and Dirichlet boundary loss, take the logarithm of the initial loss, use transfer learning and Fourier feature embedding to improve accuracy. We call our improved approach 2D 3T PINNs. Numerical experiments show that the relative <span><math><msub><mrow><mi>L</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> and the absolute <span><math><msub><mrow><mi>L</mi></mrow><mrow><mo>∞</mo></mrow></msub></math></span> error between the 2D 3T PINNs prediction and the reference solution is of the order of <span><math><msup><mrow><mn>10</mn></mrow><mrow><mo>−</mo><mn>2</mn></mrow></msup><mo>−</mo><msup><mrow><mn>10</mn></mrow><mrow><mo>−</mo><mn>3</mn></mrow></msup></math></span>.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109572"},"PeriodicalIF":7.2,"publicationDate":"2025-03-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143609857","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-06DOI: 10.1016/j.cpc.2025.109576
Jacek Kobus , Susi Lehtola
<div><div>We present an extensive review of the two-dimensional finite difference Hartree–Fock (FD HF) method, and present its implementation in the newest version of <span>x2dhf</span>, the FD HF program for atoms and diatomic molecules. The program was originally published in this journal in 1996, and was last revised in 2013. <span>x2dhf</span> can be used to obtain HF limit values of total energies and multipole moments for a wide range of diatomic molecules and their ions, using either point nuclei or a finite nuclear model. Polarizabilities (<span><math><msub><mrow><mi>α</mi></mrow><mrow><mi>z</mi><mi>z</mi></mrow></msub></math></span>) and hyperpolarizabilities (<span><math><msub><mrow><mi>β</mi></mrow><mrow><mi>z</mi><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>γ</mi></mrow><mrow><mi>z</mi><mi>z</mi><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>A</mi></mrow><mrow><mi>z</mi><mo>,</mo><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>B</mi></mrow><mrow><mi>z</mi><mi>z</mi><mo>,</mo><mi>z</mi><mi>z</mi></mrow></msub></math></span>) can also be computed by the program with the finite-field method. <span>x2dhf</span> has been extensively used in the literature to assess the accuracy of existing atomic basis sets and to help in developing new ones. As a new feature since the last revision, the program can now also perform Kohn–Sham density functional calculations with local and generalized gradient exchange-correlation functionals with the Libxc library of density functionals, enabling new types of studies. Furthermore, the initialization of calculations has been greatly simplified. As before, <span>x2dhf</span> can also perform one-particle calculations with (smooth) Coulomb, Green–Sellin–Zachor and Krammers–Henneberger potentials, while calculations with a superposition of atomic potentials have been added as a new feature. The program is easy to install from the GitHub repository and build via CMake using the <span>x2dhfctl</span> script that facilitates creating its single- and multiple-threaded versions, as well as building in Libxc support. Calculations can be carried out with <span>x2dhf</span> in double- or quadruple-precision arithmetic.</div></div><div><h3>New version program summary</h3><div><em>Program Title:</em> <span>x2dhf</span></div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/xxf6fc2vjm.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/x2dhf/x2dhf</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Fortran 95, C</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 184 (2013) 799-811 [1].</div><div><em>Does the new version supersede the previous version?:</em> Yes</div><div><em>Reasons for the new version:</em> Code modularisatio
{"title":"Review of the finite difference Hartree–Fock method for atoms and diatomic molecules, and its implementation in the x2dhf program","authors":"Jacek Kobus , Susi Lehtola","doi":"10.1016/j.cpc.2025.109576","DOIUrl":"10.1016/j.cpc.2025.109576","url":null,"abstract":"<div><div>We present an extensive review of the two-dimensional finite difference Hartree–Fock (FD HF) method, and present its implementation in the newest version of <span>x2dhf</span>, the FD HF program for atoms and diatomic molecules. The program was originally published in this journal in 1996, and was last revised in 2013. <span>x2dhf</span> can be used to obtain HF limit values of total energies and multipole moments for a wide range of diatomic molecules and their ions, using either point nuclei or a finite nuclear model. Polarizabilities (<span><math><msub><mrow><mi>α</mi></mrow><mrow><mi>z</mi><mi>z</mi></mrow></msub></math></span>) and hyperpolarizabilities (<span><math><msub><mrow><mi>β</mi></mrow><mrow><mi>z</mi><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>γ</mi></mrow><mrow><mi>z</mi><mi>z</mi><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>A</mi></mrow><mrow><mi>z</mi><mo>,</mo><mi>z</mi><mi>z</mi></mrow></msub></math></span>, <span><math><msub><mrow><mi>B</mi></mrow><mrow><mi>z</mi><mi>z</mi><mo>,</mo><mi>z</mi><mi>z</mi></mrow></msub></math></span>) can also be computed by the program with the finite-field method. <span>x2dhf</span> has been extensively used in the literature to assess the accuracy of existing atomic basis sets and to help in developing new ones. As a new feature since the last revision, the program can now also perform Kohn–Sham density functional calculations with local and generalized gradient exchange-correlation functionals with the Libxc library of density functionals, enabling new types of studies. Furthermore, the initialization of calculations has been greatly simplified. As before, <span>x2dhf</span> can also perform one-particle calculations with (smooth) Coulomb, Green–Sellin–Zachor and Krammers–Henneberger potentials, while calculations with a superposition of atomic potentials have been added as a new feature. The program is easy to install from the GitHub repository and build via CMake using the <span>x2dhfctl</span> script that facilitates creating its single- and multiple-threaded versions, as well as building in Libxc support. Calculations can be carried out with <span>x2dhf</span> in double- or quadruple-precision arithmetic.</div></div><div><h3>New version program summary</h3><div><em>Program Title:</em> <span>x2dhf</span></div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/xxf6fc2vjm.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/x2dhf/x2dhf</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Fortran 95, C</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 184 (2013) 799-811 [1].</div><div><em>Does the new version supersede the previous version?:</em> Yes</div><div><em>Reasons for the new version:</em> Code modularisatio","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"311 ","pages":"Article 109576"},"PeriodicalIF":7.2,"publicationDate":"2025-03-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143577786","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-05DOI: 10.1016/j.cpc.2025.109568
Junzhe Liu, Jin Lei, Zhongzhou Ren
<div><div>We introduce COLOSS, a program designed to address the scattering problem using a bound-state technique known as complex scaling. In this method, the oscillatory boundary conditions of the wave function are transformed into exponentially decaying ones, accommodating the long-range Coulomb interaction. The program implements the general local optical potential and the Perey-Buck non-local optical potential, with all potential parameters included in a well-designed input format for ease of use. The design offers users direct access to compute <em>S</em>-matrices and cross-sections for scattering processes involving a projectile of any spin interacting with a spin-0 target. We provide thorough discussions on the precision of Lagrange functions and their benefits in evaluating matrix elements. Additionally, COLOSS incorporates two distinct rotation methods, making it adaptable to potentials without analytical expressions. Comparative results demonstrate that COLOSS achieves high accuracy when compared with the direct integration method, Numerov, underscoring its utility and effectiveness in scattering calculations.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> COLOSS</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/ph4m98rpv2.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/jinleiphys/COLOSS</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Fortran</div><div><em>Nature of problem:</em> The study of elastic scattering between nuclei is a fundamental problem in nuclear physics, key to understanding nuclear interactions and structure. Traditional methods for solving the Schrödinger equation in such contexts often require imposing boundary conditions at large distances, which can be computationally challenging and prone to inaccuracies, especially for reactions involving strong Coulomb interactions and complex potentials. The complex scaling method offers a robust alternative by transforming the scattered wave function from an oscillatory to an exponentially decaying form, thus eliminating the need for boundary conditions. However, implementing this method requires careful numerical handling and validation of the analytic properties of the involved potentials, such as the Woods-Saxon function, on the complex plane. Additionally, ensuring numerical stability and accuracy across different rotational techniques and integration methods is crucial. This study addresses these challenges by developing a program that leverages the complex scaling method, providing a flexible and accurate tool for calculating elastic scattering between nuclei. The program's ability to handle various optical model potentials and its validation against established methods like Numerov underscores its utility and reliability in nuclear physics research.</div><div><e
{"title":"COLOSS: Complex-scaled Optical and couLOmb Scattering Solver","authors":"Junzhe Liu, Jin Lei, Zhongzhou Ren","doi":"10.1016/j.cpc.2025.109568","DOIUrl":"10.1016/j.cpc.2025.109568","url":null,"abstract":"<div><div>We introduce COLOSS, a program designed to address the scattering problem using a bound-state technique known as complex scaling. In this method, the oscillatory boundary conditions of the wave function are transformed into exponentially decaying ones, accommodating the long-range Coulomb interaction. The program implements the general local optical potential and the Perey-Buck non-local optical potential, with all potential parameters included in a well-designed input format for ease of use. The design offers users direct access to compute <em>S</em>-matrices and cross-sections for scattering processes involving a projectile of any spin interacting with a spin-0 target. We provide thorough discussions on the precision of Lagrange functions and their benefits in evaluating matrix elements. Additionally, COLOSS incorporates two distinct rotation methods, making it adaptable to potentials without analytical expressions. Comparative results demonstrate that COLOSS achieves high accuracy when compared with the direct integration method, Numerov, underscoring its utility and effectiveness in scattering calculations.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> COLOSS</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/ph4m98rpv2.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/jinleiphys/COLOSS</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Fortran</div><div><em>Nature of problem:</em> The study of elastic scattering between nuclei is a fundamental problem in nuclear physics, key to understanding nuclear interactions and structure. Traditional methods for solving the Schrödinger equation in such contexts often require imposing boundary conditions at large distances, which can be computationally challenging and prone to inaccuracies, especially for reactions involving strong Coulomb interactions and complex potentials. The complex scaling method offers a robust alternative by transforming the scattered wave function from an oscillatory to an exponentially decaying form, thus eliminating the need for boundary conditions. However, implementing this method requires careful numerical handling and validation of the analytic properties of the involved potentials, such as the Woods-Saxon function, on the complex plane. Additionally, ensuring numerical stability and accuracy across different rotational techniques and integration methods is crucial. This study addresses these challenges by developing a program that leverages the complex scaling method, providing a flexible and accurate tool for calculating elastic scattering between nuclei. The program's ability to handle various optical model potentials and its validation against established methods like Numerov underscores its utility and reliability in nuclear physics research.</div><div><e","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"311 ","pages":"Article 109568"},"PeriodicalIF":7.2,"publicationDate":"2025-03-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143552983","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-04DOI: 10.1016/j.cpc.2025.109569
Youqiong Liu , Li Cai , Yaping Chen , Qixing Chen
Blood flow modeling can improve our understanding of vascular pathologies, assist in designing more effective drug delivery systems, and aid in developing safe and effective medical devices. Physics-informed neural networks (PINN) have been used to simulate blood flow by encoding the nonlinear Navier–Stokes equations and training data into the neural network. However, noninvasive, real-time and accurate acquisition of hemodynamics data remains a challenge for current invasive detection and simulation algorithms. In this paper, we propose an integral conservation physics-informed neural networks (ICPINN) with adaptive activation functions to accurately predict the velocity, pressure, and wall shear stress (WSS) based on patient-specific vessel geometries without relying on any simulation data. To achieve unsupervised learning, loss function incorporates mass flow rate residuals derived from the mass conservation law, significantly enhancing the precision and effectiveness of the predictions. Moreover, a detailed comparative analysis of various weighting coefficient selection strategies and activation functions is performed, which ultimately identifies the optimal configuration for 3D blood flow simulations that achieves the lowest relative error. Numerical results demonstrate that the proposed ICPINN framework enables accurate prediction of blood flow in realistic cardiovascular geometry, and that mass flow rate is essential for complex structures, such as bifurcations, U-bend, stenosis, and aneurysms, offering potential applications in medical diagnostics and treatment planning.
{"title":"ICPINN: Integral conservation physics-informed neural networks based on adaptive activation functions for 3D blood flow simulations","authors":"Youqiong Liu , Li Cai , Yaping Chen , Qixing Chen","doi":"10.1016/j.cpc.2025.109569","DOIUrl":"10.1016/j.cpc.2025.109569","url":null,"abstract":"<div><div>Blood flow modeling can improve our understanding of vascular pathologies, assist in designing more effective drug delivery systems, and aid in developing safe and effective medical devices. Physics-informed neural networks (PINN) have been used to simulate blood flow by encoding the nonlinear Navier–Stokes equations and training data into the neural network. However, noninvasive, real-time and accurate acquisition of hemodynamics data remains a challenge for current invasive detection and simulation algorithms. In this paper, we propose an integral conservation physics-informed neural networks (ICPINN) with adaptive activation functions to accurately predict the velocity, pressure, and wall shear stress (WSS) based on patient-specific vessel geometries without relying on any simulation data. To achieve unsupervised learning, loss function incorporates mass flow rate residuals derived from the mass conservation law, significantly enhancing the precision and effectiveness of the predictions. Moreover, a detailed comparative analysis of various weighting coefficient selection strategies and activation functions is performed, which ultimately identifies the optimal configuration for 3D blood flow simulations that achieves the lowest relative error. Numerical results demonstrate that the proposed ICPINN framework enables accurate prediction of blood flow in realistic cardiovascular geometry, and that mass flow rate is essential for complex structures, such as bifurcations, U-bend, stenosis, and aneurysms, offering potential applications in medical diagnostics and treatment planning.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"311 ","pages":"Article 109569"},"PeriodicalIF":7.2,"publicationDate":"2025-03-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143552980","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-04DOI: 10.1016/j.cpc.2025.109574
Marco Neri , Pasquale Zumbolo , Raffaele Albanese
This paper presents a novel method for accurately tracing magnetic field lines. This procedure is of particular interest for axisymmetric nuclear fusion devices. The design of the plasma facing components in a tokamak strictly depends on the Scrape-Off Layer (SOL), a thin region of open field lines through which charged particles and energy flow out from the plasma core to the solid walls with a huge heat flux. The power exhaust issue is among the top priorities in the European Fusion Roadmap, hence the determination of the plasma boundary and SOL with a high accuracy is essential. Existing equilibrium codes using finite element formulations with linear triangles of mesh size provide a piecewise constant magnetic flux gradient, resulting in coarse accuracy of the field lines in the SOL, with an error of order , especially near the X-point where the flux gradient approaches zero. The proposed procedure is based on a method introduced in 2023, which achieves continuity and a convergence rate of order for the magnetic flux gradient too. The magnetic poloidal flux is then approximated with a piecewise polynomial function of second or third degree in the triangles. A more accurate evaluation of the plasma boundary and SOL field lines is obtained, particularly near the X-point, which is no longer constrained to be a mesh node. The method has been successfully tested in two cases with available analytical solutions. It has also been used as a post-processor for the flat top configuration of the DTT tokamak obtained with the free boundary CREATE-NL+ equilibrium code. For a given accuracy, the computational cost of the procedure is significantly lower than alternative methods relying on finer first order discretization or techniques using triangular C1 finite elements.
{"title":"Accurate plasma boundary calculation using linear triangular finite elements","authors":"Marco Neri , Pasquale Zumbolo , Raffaele Albanese","doi":"10.1016/j.cpc.2025.109574","DOIUrl":"10.1016/j.cpc.2025.109574","url":null,"abstract":"<div><div>This paper presents a novel method for accurately tracing magnetic field lines. This procedure is of particular interest for axisymmetric nuclear fusion devices. The design of the plasma facing components in a tokamak strictly depends on the Scrape-Off Layer (SOL), a thin region of open field lines through which charged particles and energy flow out from the plasma core to the solid walls with a huge heat flux. The power exhaust issue is among the top priorities in the European Fusion Roadmap, hence the determination of the plasma boundary and SOL with a high accuracy is essential. Existing equilibrium codes using finite element formulations with linear triangles of mesh size <span><math><mi>h</mi></math></span> provide a piecewise constant magnetic flux gradient, resulting in coarse accuracy of the field lines in the SOL, with an error of order <span><math><mrow><mi>O</mi><mo>(</mo><mi>h</mi><mo>)</mo></mrow></math></span>, especially near the X-point where the flux gradient approaches zero. The proposed procedure is based on a method introduced in 2023, which achieves continuity and a convergence rate of order <span><math><mrow><mi>O</mi><mo>(</mo><msup><mrow><mi>h</mi></mrow><mn>2</mn></msup><mo>)</mo><mspace></mspace></mrow></math></span> for the magnetic flux gradient too. The magnetic poloidal flux is then approximated with a piecewise polynomial function of second or third degree in the triangles. A more accurate evaluation of the plasma boundary and SOL field lines is obtained, particularly near the X-point, which is no longer constrained to be a mesh node. The method has been successfully tested in two cases with available analytical solutions. It has also been used as a post-processor for the flat top configuration of the DTT tokamak obtained with the free boundary CREATE-NL+ equilibrium code. For a given accuracy, the computational cost of the procedure is significantly lower than alternative methods relying on finer first order discretization or techniques using triangular C<sup>1</sup> finite elements.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"311 ","pages":"Article 109574"},"PeriodicalIF":7.2,"publicationDate":"2025-03-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143611268","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2025-03-04DOI: 10.1016/j.cpc.2025.109573
N. Stanojević , A. Demić , N. Vuković , P. Dean , Z. Ikonić , D. Indjin , J. Radovanović
We develop a machine precision transfer matrix method that can be used for a wide range of ordinary differential equations and eigenvalue problems. One of the major drawbacks of transfer matrix approaches is the requirement to sweep parameters in a shooting-like manner, thus lacking in precision in comparison to finite difference methods. We resolve this by finding the zero of the analytically calculated first derivative of the transfer matrix. This allows us to outperform the finite difference approach and compute eigenvalues with high precision and linear numerical complexity. We test the developed model in the following scenarios in semiconductor quantum heterostructures: standard Schrödinger equation under effective mass approximation with parabolic subbands, with two-band nonparabolicity, a order Schrödigner equation that accounts for nonparabolic subbands using the 14 k⋅p approach and calculation of the interface phonon modes dispersion relations and the mode profiles. We show that the developed derivative transfer matrix method outperforms the finite difference method by being able to handle higher spatial resolution and having better time performance. The numerical implementation of our models is available as an open-source package in MATLAB version that can be found on https://github.com/AcaDemicNanoLab/dTMM_Schrodinger.
{"title":"Derivative transfer matrix method: Machine precision calculation of electron structure and interface phonon dispersion in semiconductor heterostructures","authors":"N. Stanojević , A. Demić , N. Vuković , P. Dean , Z. Ikonić , D. Indjin , J. Radovanović","doi":"10.1016/j.cpc.2025.109573","DOIUrl":"10.1016/j.cpc.2025.109573","url":null,"abstract":"<div><div>We develop a machine precision transfer matrix method that can be used for a wide range of ordinary differential equations and eigenvalue problems. One of the major drawbacks of transfer matrix approaches is the requirement to sweep parameters in a shooting-like manner, thus lacking in precision in comparison to finite difference methods. We resolve this by finding the zero of the analytically calculated first derivative of the transfer matrix. This allows us to outperform the finite difference approach and compute eigenvalues with high precision and linear numerical complexity. We test the developed model in the following scenarios in semiconductor quantum heterostructures: standard Schrödinger equation under effective mass approximation with parabolic subbands, with two-band nonparabolicity, a <span><math><msup><mrow><mn>4</mn></mrow><mrow><mi>th</mi></mrow></msup></math></span> order Schrödigner equation that accounts for nonparabolic subbands using the 14 <strong>k</strong>⋅<strong>p</strong> approach and calculation of the interface phonon modes dispersion relations and the mode profiles. We show that the developed derivative transfer matrix method outperforms the finite difference method by being able to handle higher spatial resolution and having better time performance. The numerical implementation of our models is available as an open-source package in MATLAB version that can be found on <span><span>https://github.com/AcaDemicNanoLab/dTMM_Schrodinger</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"311 ","pages":"Article 109573"},"PeriodicalIF":7.2,"publicationDate":"2025-03-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143601118","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}