{"title":"A conservative constrained clustering-merging algorithm for particle-in-cell codes","authors":"Dong-sheng Cai, Ping-yang Wang","doi":"10.1016/j.cpc.2025.109621","DOIUrl":"10.1016/j.cpc.2025.109621","url":null,"abstract":"<div><div>The particle merging algorithm enables particle-in-cell codes to simulate the process of rapidly increasing particle numbers. Dividing particles that are close in phase space into a subset for merging is beneficial for preserving the particle distribution function (PDF). However, larger subsets can cause particles with significant differences to be grouped together. To address this issue, we proposed a conservative constrained clustering-merging algorithm which employs the constrained k-means method to keep the number of particles within each subset at a low level while meeting the requirement of conserving physical quantities. Subsequently, the particles in each subset are merged by probabilistically adjusting their weights. The impact of subset size on the merging results and computational performance is also discussed.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"313 ","pages":"Article 109621"},"PeriodicalIF":7.2,"publicationDate":"2025-04-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143875038","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}
{"title":"PyHTStack2D: A Python package for high-throughput homo/hetero stacking of 2D materials","authors":"Qian Zhang , Jinlong Yang , Wei Hu","doi":"10.1016/j.cpc.2025.109618","DOIUrl":"10.1016/j.cpc.2025.109618","url":null,"abstract":"<div><div>Two-dimensional (2D) van der Waals (vdWs) structures are the subject of extensive research in materials science, celebrated for their unique physical properties and potential technological applications. However, the diversity of stacking modes in 2D vdWs structures poses a challenge for research. In response to the complexity of the stacking process for these layered structures, we have developed a Python package, PyHTStack2D, specifically designed to support High-Throughput Stacking of 2D materials research. The package provides two primary functionalities: Firstly, it facilitates the batch stacking of homo- and heterostructures, with careful consideration of specific sequences and patterns, such as those observed in the 1T/2H phase transitions of transition metal dichalcogenides; Secondly, it aids in the efficient creation of computational directories and the generation of requisite shell scripts for the batch computation submissions of the stacked structures. By employing this package, we performed high-throughput computational simulations of properties such as electronic energy band structures and magnetic ground states of bilayers composed of 2H-TMDHs. These results have enabled us to identify the types of electronic band structures within these systems, providing critical insights into their potential applications in optoelectronics and photocatalysis. Furthermore, preliminary findings indicate the potential feasibility of generating bipolar magnetic semiconductors via the stacking of magnetic monolayers. The PyHTStack2D package provides an opportunity to perform efficient high-throughput calculations of 2D vdWs homo/heterostructures.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109618"},"PeriodicalIF":7.2,"publicationDate":"2025-04-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143816790","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}
A.Y. Pankin , J. Breslau , M. Gorelenkova , R. Andre , B. Grierson , J. Sachdev , M. Goliyad , G. Perumpilly
{"title":"TRANSP integrated modeling code for interpretive and predictive analysis of tokamak plasmas","authors":"A.Y. Pankin , J. Breslau , M. Gorelenkova , R. Andre , B. Grierson , J. Sachdev , M. Goliyad , G. Perumpilly","doi":"10.1016/j.cpc.2025.109611","DOIUrl":"10.1016/j.cpc.2025.109611","url":null,"abstract":"<div><div>This paper provides a comprehensive review of the TRANSP code, a sophisticated tool for interpretive and predictive analysis of tokamak plasmas, detailing its major capabilities and features. It describes the equations for particle, power, and momentum balance analysis, as well as the poloidal field diffusion equations. The paper outlines the spatial and time grids used in TRANSP and details the equilibrium assumptions and solvers. Various models for heating and current drive and radiation, including updates to the NUBEAM model, are discussed. The handling of large-scale events such as sawtooth crashes and pellet injections is examined, along with the predictive capabilities for advancing plasma profiles. The integration of TRANSP with the ITER Integrated Modeling and Analysis Suite (IMAS) is highlighted, demonstrating enhanced data access and analysis capabilities. Additionally, the paper discusses best practices and continuous integration techniques to enhance TRANSP's robustness. The suite of TRANSP tools, designed for efficient data analysis and simulation, further supports the optimization of tokamak operations and coupling with other tokamak codes. Continuous development and support ensure that TRANSP remains a major code for the analysis of experimental data for controlled thermonuclear fusion, maintaining its critical role in supporting the optimization of tokamak operations and advancing fusion research.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109611"},"PeriodicalIF":7.2,"publicationDate":"2025-04-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143820669","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}
Aitor Calvo-Fernández , María Blanco-Rey , Asier Eiguren
{"title":"Numerical renormalization group calculations for magnetic impurity systems with spin-orbit coupling and crystal-field effects","authors":"Aitor Calvo-Fernández , María Blanco-Rey , Asier Eiguren","doi":"10.1016/j.cpc.2025.109613","DOIUrl":"10.1016/j.cpc.2025.109613","url":null,"abstract":"<div><div>Exploiting symmetries in the numerical renormalization group (NRG) method significantly enhances performance by improving the accuracy, increasing the computational speed, and optimizing the memory efficiency. Published codes focus on continuous rotations and unitary groups, which generally are not applicable to systems with strong crystal-field effects. The <span>PointGroupNRG</span> code implements symmetries related to discrete rotation groups, which are defined by the user in terms of Clebsch-Gordan coefficients, together with particle conservation and spin rotation symmetries. In this paper we present a new version of the code that extends the available finite groups, previously limited to simply reducible point groups, in a way that all point and double groups become accessible. It also includes the full spin-orbital rotation group. Moreover, to improve the code's flexibility for impurities with complex interactions, this new version allows to choose between a standard Anderson Hamiltonian for the impurity or, as another novel feature, an ionic model that requires only the spectrum and the impurity Lehmann amplitudes.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> PointGroupNRG</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/hjwmt6cc55.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/aitorcf/PointGroupNRG</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3</div><div><em>Programming language:</em> Julia</div><div><em>Journal reference of previous version:</em> Comput. Phys. Commun. 296 (2024), 109032, <span><span>https://doi.org/10.1016/j.cpc.2023.109032</span><svg><path></path></svg></span></div><div><em>Does the new version supersede the previous version?:</em> Yes.</div><div><em>Reasons for the new version:</em> Extension.</div><div><em>Nature of problem:</em> Numerical renormalization group (NRG) calculations for realistic models are computationally expensive, mainly due to their hard scaling with the number of orbital and spin configurations available for the electrons. Symmetry considerations reduce the computational cost of the calculations by exploiting the block structure of the operator matrix elements and by removing the redundancy in the symmetry-related matrix elements. Existing codes implement continuous symmetries, which are not generally and/or straightforwardly applicable to systems where spin-orbit and crystal-field effects need to be taken into account.</div><div><em>Solution method:</em> The first version of the code <span><span>[1]</span></span> introduced finite point group symmetries together with particle conservation and spin isotropy, useful for systems with strong crystal-field effects but negligible spin-orbit coupling. This new version also includes total angular momentum conservation and double group symmetries, together with particle co","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109613"},"PeriodicalIF":7.2,"publicationDate":"2025-04-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143816721","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}
{"title":"KPROJ: A program for unfolding electronic and phononic bands","authors":"Jiaxin Chen , M. Weinert , Mingxing Chen","doi":"10.1016/j.cpc.2025.109614","DOIUrl":"10.1016/j.cpc.2025.109614","url":null,"abstract":"<div><div>We introduce a program named KPROJ that unfolds the electronic and phononic band structure of materials modeled by supercells. The program is based on the <em>k</em>-projection method, which projects the wavefunction of the supercell onto the <em>k</em>-points in the Brillouin zone of the artificial primitive cell. It allows for obtaining an effective “local” band structure by performing partial integration over the <em>k</em>-projected wavefunctions, e.g., the unfolded band structure with layer-projection for interfaces and the weighted band structure in the vacuum for slabs. The layer <em>k</em>-projection is accelerated by a scheme that combines the Fast Fourier Transform (FFT) and the inverse FFT algorithms. It is now interfaced with several first-principles codes based on plane waves such as VASP, Quantum Espresso, and ABINIT. In addition, it also has interfaces with ABACUS, a first-principles simulation package based on numerical atomic basis sets, and PHONOPY, a program for phonon calculations.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> KPROJ</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/f6n5phpy8f.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/mxchen-2020/kproj</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> GPLv3.0</div><div><em>Programming language:</em> Fortran 90</div><div><em>Nature of problem:</em> Supercells are widely used to model doped systems and interfaces within the framework of first-principles methods. However, the use of supercells causes band folding, which is unfavorable for understanding the effects of doping and interfacing on the band structure of materials. Moreover, the folding also brings difficulties in explaining the results of angle-resolved photoemission spectroscopy experiments.</div><div><em>Solution method:</em> This program is designed to calculate the unfolded band structure for systems modeled by supercells. The unfolding is performed by projecting the wave functions of the supercell onto the <em>k</em>-points in the BZ of the primitive cell. The projector operator is built by the translation operator and its irreducible representation. The layer <em>k</em>-projected band structure is obtained by integrating the projected wave function in a selected spatial window, for which the FFT and inverse FFT algorithms are used to accelerate the calculation.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109614"},"PeriodicalIF":7.2,"publicationDate":"2025-04-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143808326","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}
Mengbo Zhu , Jianfeng Chen , Xiaoqiang Li , Congshan Zhuo , Sha Liu , Chengwen Zhong
{"title":"A simplified conservation flux scheme for gas kinetics based on OpenFOAM framework I: Shakhov model","authors":"Mengbo Zhu , Jianfeng Chen , Xiaoqiang Li , Congshan Zhuo , Sha Liu , Chengwen Zhong","doi":"10.1016/j.cpc.2025.109598","DOIUrl":"10.1016/j.cpc.2025.109598","url":null,"abstract":"<div><div>A solver for the Shakhov model equation, founded on dugksFOAM, has been successfully developed. This was achieved through the application of a conservation-type gas kinetic scheme with a simplified interface flux. The process begins with the updating of macroscopic quantities. Subsequently, the distribution function is computed using these newly updated values. This innovative approach effectively mitigates errors that might occur during the integration of the distribution function, especially when an unstructured velocity space is employed. The solver offers two distinct methods for velocity space integration. The first is a traditional structured space, which can be conveniently adjusted and configured via input files. The second is an unstructured space, which utilizes fewer discrete velocity points. These points are determined based on the mesh files provided by the user. In this unstructured approach, the velocity points are strategically positioned to strike an optimal balance between computing efficiency and precision, thereby enhancing the overall performance and accuracy of the solver.</div><div>The solver's hybrid parallelization technique, specifically the X-space parallelization approach that encompasses both physical and velocity spaces, empowers the efficient execution of large-scale three-dimensional simulations. By subjecting the solver to benchmark cases such as shock tube problems, lid-driven cavity flow, Poiseuille flow, and flows past cylinders, sphere and X-38 vehicle, the accuracy and dependability of this solver have been thoroughly validated and verified. This comprehensive verification process not only benchmark cases the solver's robustness in handling diverse fluid dynamics scenarios but also highlights its potential for broader applications in the field of computational fluid dynamics.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109598"},"PeriodicalIF":7.2,"publicationDate":"2025-04-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143816791","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}
{"title":"Analytic model for the propagation of a collisionless neutral beam","authors":"Lynton Appel","doi":"10.1016/j.cpc.2025.109610","DOIUrl":"10.1016/j.cpc.2025.109610","url":null,"abstract":"<div><div>This paper introduces an analytical model for the propagation of collisionless neutral particles in neutral beam injection (NBI) systems. The model incorporates a novel approach using composite Gaussian basis functions to represent non-Gaussian source distributions and extends to two-dimensional source configurations under orthogonal separability assumptions. The method efficiently computes particle velocity and spatial distributions along beam trajectories, accounting for truncation effects due to transmission losses. The model has been implemented as a computational module in the Minerva framework and interfaced with the ITER Integrated Modelling & Analysis Suite (IMAS).</div><div>A case study of the MAST Upgrade NBI system demonstrates the model's ability to predict particle distributions from the source grid to the plasma cavity while accommodating detailed baffle geometries and calculating transmission factors. Comparisons reveal that reduced Gaussian basis representations can achieve an order-of-magnitude reduction in computational time with negligible impact on accuracy. The proposed model provides a fast and rigorous alternative to Monte Carlo simulations, enabling enhanced diagnostic modelling and efficient integration with Bayesian inference frameworks.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109610"},"PeriodicalIF":7.2,"publicationDate":"2025-04-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143830125","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}
{"title":"Semi-automatic calculations of multi-loop Feynman amplitudes with AmpRed","authors":"Wen Chen","doi":"10.1016/j.cpc.2025.109607","DOIUrl":"10.1016/j.cpc.2025.109607","url":null,"abstract":"<div><div>We present a Mathematica package <strong>AmpRed</strong> for the semi-automatic calculations of multi-loop Feynman amplitudes with high efficiency and precision. <strong>AmpRed</strong> implements the methods of integration by parts and differential equations in the Feynman-parameter representation. It allows for the calculations of general parametric integrals (which may not have momentum-space correspondences). Various user-friendly tools for multi-loop calculations, such as those to construct and solve differential equations for Feynman integrals, are provided. It can also deal with tensor algebras in non-relativistic field theories. Interfaces to some packages, like <span>QGRAF</span> and FORM, are also provided.</div></div><div><h3>Program summary</h3><div><em>Program title:</em> <strong>AmpRed</strong>, version 1.0</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/swnf723tdh.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://gitlab.com/chenwenphy/ampred</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> MIT license</div><div><em>Programming language:</em> Wolfram Mathematica 10.0, or newer</div><div><em>Nature of problem:</em> Reduce Feynman amplitudes to linear combinations of master integrals, and calculate master integrals numerically.</div><div><em>Solution method:</em> Reduce Feynman amplitudes by using the methods developed in refs. [1-3], and calculate master integrals recursively by using the method developed in ref. [4].</div></div><div><h3>References</h3><div><ul><li><span>[1]</span><span><div>W. Chen, Reduction of Feynman integrals in the parametric representation, J. High Energy Phys. 02 (2020) 115.</div></span></li><li><span>[2]</span><span><div>W. Chen, Reduction of Feynman integrals in the parametric representation II: reduction of tensor integrals, Eur. Phys. J. C 81 (2021) 244.</div></span></li><li><span>[3]</span><span><div>W. Chen, Reduction of Feynman integrals in the parametric representation III: integrals with cuts, Eur. Phys. J. C 80 (2020) 1173.</div></span></li><li><span>[4]</span><span><div>W. Chen, M.-x. Luo, T.-Z. Yang, H.X. Zhu, Soft theorem to three loops in QCD and <span><math><mi>N</mi><mo>=</mo><mn>4</mn></math></span> super Yang-Mills theory, J. High Energy Phys. 01 (2024) 131.</div></span></li></ul></div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109607"},"PeriodicalIF":7.2,"publicationDate":"2025-04-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143791928","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}
{"title":"OPITeR: A program for tensor reduction of multi-loop Feynman integrals","authors":"Jae Goode, Franz Herzog, Sam Teale","doi":"10.1016/j.cpc.2025.109606","DOIUrl":"10.1016/j.cpc.2025.109606","url":null,"abstract":"<div><div>We present <span>OPITeR</span>, a <span>Form</span> program for the reduction of multi-loop tensor Feynman integrals. The program can handle tensors, including spinor indices, with rank of up to 20 and can deal with up to 8 independent external momenta. The reduction occurs in <em>D</em> dimensions compatible with conventional dimensional regularization. The program is able to manifest symmetries of the integrand in the tensor reduced form.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109606"},"PeriodicalIF":7.2,"publicationDate":"2025-04-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143808327","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}
Matěj Gajdoš , Hugo Natal da Luz , Geovane G.A. Souza , Marco Bregant
{"title":"TPC track denoising and recognition using convolutional neural networks","authors":"Matěj Gajdoš , Hugo Natal da Luz , Geovane G.A. Souza , Marco Bregant","doi":"10.1016/j.cpc.2025.109608","DOIUrl":"10.1016/j.cpc.2025.109608","url":null,"abstract":"<div><div>The capability of convolutional neural networks to remove spurious signals caused by electronic noise, microdischarges and other effects from experimental data obtained with Time Projection Chambers is studied. A generator of synthetic data for the training of the neural network is described and its performance is compared with the results obtained with a conventional algorithm. The Physical meaning of the data resulting from the neural network and conventional denoising algorithms is thoroughly analysed, demonstrating the potential of convolutional neural networks in the preparation of raw data for analysis.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"312 ","pages":"Article 109608"},"PeriodicalIF":7.2,"publicationDate":"2025-04-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143791927","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}