Featured Column — COMPUTATIONAL PROGRAMS FOR PHYSICS

    To promote the sharing and cooperation of computer programs developed for physics, which helps to reduce the barrier and lighten the burden of program development for physicists, Chinese Physics B launches a new section, “Computational Programs for Physics” in 2023. 

    Both research papers and review articles are welcome. Good computational programs are the focus of this section, whereas new physics and results are not necessary for acceptance. A good program should contain at least one of these factors: accuracy, efficiency, new functionality, accessibility, expansibility, etc.

    Default Latest Most Read
    Please wait a minute...
    For selected: Toggle thumbnails
    MatChat: A large language model and application service platform for materials science
    Zi-Yi Chen(陈子逸), Fan-Kai Xie(谢帆恺), Meng Wan(万萌), Yang Yuan(袁扬), Miao Liu(刘淼), Zong-Guo Wang(王宗国), Sheng Meng(孟胜), and Yan-Gang Wang(王彦棡)
    Chin. Phys. B, 2023, 32 (11): 118104.   DOI: 10.1088/1674-1056/ad04cb
    Abstract441)   HTML19)    PDF (587KB)(458)      
    The prediction of chemical synthesis pathways plays a pivotal role in materials science research. Challenges, such as the complexity of synthesis pathways and the lack of comprehensive datasets, currently hinder our ability to predict these chemical processes accurately. However, recent advancements in generative artificial intelligence (GAI), including automated text generation and question-answering systems, coupled with fine-tuning techniques, have facilitated the deployment of large-scale AI models tailored to specific domains. In this study, we harness the power of the LLaMA2-7B model and enhance it through a learning process that incorporates 13878 pieces of structured material knowledge data. This specialized AI model, named MatChat, focuses on predicting inorganic material synthesis pathways. MatChat exhibits remarkable proficiency in generating and reasoning with knowledge in materials science. Although MatChat requires further refinement to meet the diverse material design needs, this research undeniably highlights its impressive reasoning capabilities and innovative potential in materials science. MatChat is now accessible online and open for use, with both the model and its application framework available as open source. This study establishes a robust foundation for collaborative innovation in the integration of generative AI in materials science.
    Analysis of pseudo-random number generators in QMC-SSE method
    Dong-Xu Liu(刘东旭), Wei Xu(徐维), and Xue-Feng Zhang(张学锋)
    Chin. Phys. B, 2024, 33 (3): 037509.   DOI: 10.1088/1674-1056/ad1e69
    Abstract206)   HTML10)    PDF (514KB)(264)      
    In the quantum Monte Carlo (QMC) method, the pseudo-random number generator (PRNG) plays a crucial role in determining the computation time. However, the hidden structure of the PRNG may lead to serious issues such as the breakdown of the Markov process. Here, we systematically analyze the performance of different PRNGs on the widely used QMC method known as the stochastic series expansion (SSE) algorithm. To quantitatively compare them, we introduce a quantity called QMC efficiency that can effectively reflect the efficiency of the algorithms. After testing several representative observables of the Heisenberg model in one and two dimensions, we recommend the linear congruential generator as the best choice of PRNG. Our work not only helps improve the performance of the SSE method but also sheds light on the other Markov-chain-based numerical algorithms.
    DSAS: A new macromolecular substructure solution program based on the modified phase-retrieval algorithm
    Xingke Fu(付兴科), Zhenxi Tan(谭振希), Zhi Geng(耿直), Qian Liu(刘茜), and Wei Ding(丁玮)
    Chin. Phys. B, 2024, 33 (5): 056102.   DOI: 10.1088/1674-1056/ad3c33
    Abstract193)   HTML2)    PDF (1091KB)(280)      
    Considering the pivotal role of single-wavelength anomalous diffraction (SAD) in macromolecular crystallography, our objective was to introduce {DSAS}, a novel program designed for efficient anomalous scattering substructure determination. DSAS stands out with its core components: a modified phase-retrieval algorithm and automated parameter tuning. The software boasts an intuitive graphical user interface (GUI), facilitating seamless input of essential data and real-time monitoring. Extensive testing on DSAS has involved diverse datasets, encompassing proteins, nucleic acids, and various anomalous scatters such as sulfur (S), selenium (Se), metals, and halogens. The results confirm {DSAS}'s exceptional performance in accurately determining heavy atom positions, making it a highly effective tool in the field.
    Literature classification and its applications in condensed matter physics and materials science by natural language processing
    Siyuan Wu(吴思远), Tiannian Zhu(朱天念), Sijia Tu(涂思佳), Ruijuan Xiao(肖睿娟), Jie Yuan(袁洁), Quansheng Wu(吴泉生), Hong Li(李泓), and Hongming Weng(翁红明)
    Chin. Phys. B, 2024, 33 (5): 050704.   DOI: 10.1088/1674-1056/ad3c30
    Abstract238)   HTML4)    PDF (681KB)(154)      
    The exponential growth of literature is constraining researchers' access to comprehensive information in related fields. While natural language processing (NLP) may offer an effective solution to literature classification, it remains hindered by the lack of labelled dataset. In this article, we introduce a novel method for generating literature classification models through semi-supervised learning, which can generate labelled dataset iteratively with limited human input. We apply this method to train NLP models for classifying literatures related to several research directions, i.e., battery, superconductor, topological material, and artificial intelligence (AI) in materials science. The trained NLP `battery' model applied on a larger dataset different from the training and testing dataset can achieve F1 score of 0.738, which indicates the accuracy and reliability of this scheme. Furthermore, our approach demonstrates that even with insufficient data, the not-well-trained model in the first few cycles can identify the relationships among different research fields and facilitate the discovery and understanding of interdisciplinary directions.
    Quafu-Qcover: Explore combinatorial optimization problems on cloud-based quantum computers
    Hong-Ze Xu(许宏泽), Wei-Feng Zhuang(庄伟峰), Zheng-An Wang(王正安), Kai-Xuan Huang(黄凯旋), Yun-Hao Shi(时运豪), Wei-Guo Ma(马卫国), Tian-Ming Li(李天铭), Chi-Tong Chen(陈驰通), Kai Xu(许凯), Yu-Long Feng(冯玉龙), Pei Liu(刘培), Mo Chen(陈墨), Shang-Shu Li(李尚书), Zhi-Peng Yang(杨智鹏), Chen Qian(钱辰), Yu-Xin Jin(靳羽欣), Yun-Heng Ma(马运恒), Xiao Xiao(肖骁), Peng Qian(钱鹏), Yanwu Gu(顾炎武), Xu-Dan Chai(柴绪丹), Ya-Nan Pu(普亚南), Yi-Peng Zhang(张翼鹏), Shi-Jie Wei(魏世杰), Jin-Feng Zeng(增进峰), Hang Li(李行), Gui-Lu Long(龙桂鲁), Yirong Jin(金贻荣), Haifeng Yu(于海峰), Heng Fan(范桁), Dong E. Liu(刘东), and Meng-Jun Hu(胡孟军)
    Chin. Phys. B, 2024, 33 (5): 050302.   DOI: 10.1088/1674-1056/ad18ab
    Abstract249)   HTML3)    PDF (2109KB)(257)      
    We introduce Quafu-Qcover, an open-source cloud-based software package developed for solving combinatorial optimization problems using quantum simulators and hardware backends. Quafu-Qcover provides a standardized and comprehensive workflow that utilizes the quantum approximate optimization algorithm (QAOA). It facilitates the automatic conversion of the original problem into a quadratic unconstrained binary optimization (QUBO) model and its corresponding Ising model, which can be subsequently transformed into a weight graph. The core of Qcover relies on a graph decomposition-based classical algorithm, which efficiently derives the optimal parameters for the shallow QAOA circuit. Quafu-Qcover incorporates a dedicated compiler capable of translating QAOA circuits into physical quantum circuits that can be executed on Quafu cloud quantum computers. Compared to a general-purpose compiler, our compiler demonstrates the ability to generate shorter circuit depths, while also exhibiting superior speed performance. Additionally, the Qcover compiler has the capability to dynamically create a library of qubits coupling substructures in real-time, utilizing the most recent calibration data from the superconducting quantum devices. This ensures that computational tasks can be assigned to connected physical qubits with the highest fidelity. The Quafu-Qcover allows us to retrieve quantum computing sampling results using a task ID at any time, enabling asynchronous processing. Moreover, it incorporates modules for results preprocessing and visualization, facilitating an intuitive display of solutions for combinatorial optimization problems. We hope that Quafu-Qcover can serve as an instructive illustration for how to explore application problems on the Quafu cloud quantum computers.
    FL-Online: An x-ray crystallographic web-server for atomic-scale structure analysis of biomolecule
    Bintang Wang(王宾堂), Tongxin Niu(牛彤欣), Haifu Fan(范海福), and Wei Ding(丁玮)
    Chin. Phys. B, 2024, 33 (7): 076104.   DOI: 10.1088/1674-1056/ad47e5
    Abstract200)   HTML0)    PDF (920KB)(181)      
    FL-Online (http://fanlab.ac.cn) is an out-of-box modern web service featuring a user-friendly interface and simplified parameters, providing academic users with access to a series of online programs for biomolecular crystallography, including SAPI-online, OASIS-online, C-IPCAS-online and a series of upcoming software releases. Meanwhile, it is a highly scalable and maintainable web application framework that provides a powerful and flexible solution for academic web development needs. All the codes are open-source under MIT licenses in GitHub.
    MicroMagnetic.jl: A Julia package for micromagnetic and atomistic simulations with GPU support
    Weiwei Wang(王伟伟), Boyao Lyu(吕伯尧), Lingyao Kong(孔令尧), Hans Fangohr, and Haifeng Du(杜海峰)
    Chin. Phys. B, 2024, 33 (10): 107508.   DOI: 10.1088/1674-1056/ad766f
    Abstract192)   HTML3)    PDF (919KB)(168)      
    MicroMagnetic.jl is an open-source Julia package for micromagnetic and atomistic simulations. Using the features of the Julia programming language, MicroMagnetic.jl supports CPU and various GPU platforms, including NVIDIA, AMD, Intel, and Apple GPUs. Moreover, MicroMagnetic.jl supports Monte Carlo simulations for atomistic models and implements the nudged-elastic-band method for energy barrier computations. With built-in support for double and single precision modes and a design allowing easy extensibility to add new features, MicroMagnetic.jl provides a versatile toolset for researchers in micromagnetics and atomistic simulations.
    Charge self-consistent dynamical mean field theory calculations in combination with linear combination of numerical atomic orbitals framework based density functional theory
    Xin Qu(瞿鑫), Peng Xu(许鹏), Zhiyong Liu(刘志勇), Jintao Wang(王金涛), Fei Wang(王飞), Wei Huang(黄威), Zhongxin Li(李忠星), Weichang Xu(徐卫昌), and Xinguo Ren(任新国)
    Chin. Phys. B, 2024, 33 (10): 107106.   DOI: 10.1088/1674-1056/ad6558
    Abstract169)   HTML3)    PDF (840KB)(203)      
    We present a formalism of charge self-consistent dynamical mean field theory (DMFT) in combination with density functional theory (DFT) within the linear combination of numerical atomic orbitals (LCNAO) framework. We implemented the charge self-consistent $\rm DFT+DMFT$ formalism by interfacing a full-potential all-electron DFT code with three hybridization expansion-based continuous-time quantum Monte Carlo impurity solvers. The benchmarks on several 3d, 4f and 5f strongly correlated electron systems validated our formalism and implementation. Furthermore, within the LCANO framework, our formalism is general and the code architecture is extensible, so it can work as a bridge merging different LCNAO DFT packages and impurity solvers to do charge self-consistent $\rm DFT+DMFT$ calculations.
    A hybrid method integrating Green's function Monte Carlo and projected entangled pair states
    He-Yu Lin(林赫羽), Rong-Qiang He(贺荣强), Yibin Guo (郭奕斌), and Zhong-Yi Lu(卢仲毅)
    Chin. Phys. B, 2024, 33 (11): 117504.   DOI: 10.1088/1674-1056/ad84c9
    Abstract153)   HTML7)    PDF (2198KB)(146)      
    This paper introduces a hybrid approach combining Green's function Monte Carlo (GFMC) method with projected entangled pair state (PEPS) ansatz. This hybrid method regards PEPS as a trial state and a guiding wave function in GFMC. By leveraging PEPS's proficiency in capturing quantum state entanglement and GFMC's efficient parallel architecture, the hybrid method is well-suited for the accurate and efficient treatment of frustrated quantum spin systems. As a benchmark, we applied this approach to study the frustrated $J_1$-$J_2$ Heisenberg model on a square lattice with periodic boundary conditions (PBCs). Compared with other numerical methods, our approach integrating PEPS and GFMC shows competitive accuracy in the performance of ground-state energy. This paper provides systematic and comprehensive discussion of the approach of our previous work [Phys. Rev. B 109 235133 (2024)].
    ScatterX: A software for fast processing of high-throughput small-angle scattering data
    Fei Xie(谢飞), Mei Xie(解梅), Baoyu Song(宋宝玉), Qiaoyu Guo(郭桥雨), and Xuechen Jiao(焦学琛)
    Chin. Phys. B, 2024, 33 (12): 120101.   DOI: 10.1088/1674-1056/ad8b36
    Abstract222)   HTML1)    PDF (7197KB)(108)      
    Scattering experiments become increasingly popular in modern scientific research, including the areas of materials, biology, chemistry, physics, etc. Besides, various types of scattering facilities have been developed recently, such as lab-based x-ray scattering equipment, national synchrotron facilities and large neutron facilities. These above-mentioned trends bring up fast-increasing data amounts of scattering data, as well as different scattering types (x-ray, neutron, laser and even microwaves). To help researchers process and analyze scattering data more efficiently, we developed a general and model-free scattering data analysis software based on matrix operation, which has the unique advantage of high throughput scattering data processing, analysis and visualization. To maximize generality and efficiency, data processing is performed based on a three-dimensional matrix, where scattering curves are saved as matrices or vectors, rather than the traditional definition of paired values. It can not only realize image batch processing, background subtraction and correction, but also analyze data according to scattering theory and model, such as radius of gyration, fractal dimension and other physical quantities. In the aspect of visualization, the software allows the modify the color maps of two-dimensional scattering images and the gradual color variation of one-dimensional curves to suit efficient data communications. In all, this new software can work as a stand-alone platform for researchers to process, analyze and visualize scattering data from different research facilities without considering different file types or formats. All codes in this manuscript are open-sourced and can be easily implemented in matrix-based software, such as MATLAB, Python and Igor.
    SolarDesign: An online photovoltaic device simulation and design platform
    Wei E. I. Sha(沙威), Xiaoyu Wang(王啸宇), Wenchao Chen(陈文超), Yuhao Fu(付钰豪), Lijun Zhang(张立军), Liang Tian(田亮), Minshen Lin(林敏慎), Shudi Jiao(焦书迪), Ting Xu(徐婷), Tiange Sun(孙天歌), and Dongxue Liu(刘冬雪)
    Chin. Phys. B, 2025, 34 (1): 018801.   DOI: 10.1088/1674-1056/ad9017
    Abstract396)   HTML2)    PDF (871KB)(179)      
    SolarDesign (https://solardesign.cn/) is an online photovoltaic device simulation and design platform that provides engineering modeling analysis for crystalline silicon solar cells, as well as emerging high-efficiency solar cells such as organic, perovskite, and tandem cells. The platform offers user-updatable libraries of basic photovoltaic materials and devices, device-level multi-physics simulations involving optical-electrical-thermal interactions, and circuit-level compact model simulations based on detailed balance theory. Employing internationally advanced numerical methods, the platform accurately, rapidly, and efficiently solves optical absorption, electrical transport, and compact circuit models. It achieves multi-level photovoltaic simulation technology from "materials to devices to circuits" with fully independent intellectual property rights. Compared to commercial softwares, the platform achieves high accuracy and improves speed by more than an order of magnitude. Additionally, it can simulate unique electrical transport processes in emerging solar cells, such as quantum tunneling, exciton dissociation, and ion migration.
    Impurity sputtering model for ICRF edge plasma-surface interactions
    Quan-Zhi Zhang(张权治), Ze-Xuan Liu(刘泽璇), Fang-Fang Ma(马方方), Lei-Yu Zhang(张雷宇), and Nosir Matyakubov
    Chin. Phys. B, 2025, 34 (3): 035201.   DOI: 10.1088/1674-1056/ada437
    Abstract64)   HTML1)    PDF (1276KB)(32)      
    One of the primary concerns associated with ion cyclotron resonance heating (ICRH) is the enhanced impurity sputtering resulting from radio frequency (RF) sheath formation near plasma-facing components (PFCs), such as limiters. Developing a sputtering model integrated with RF sheath simulations allows for a more comprehensive understanding of the kinetic behavior of incident ions and their interactions with the limiter surface. We accordingly develop an impurity sputtering model "PMSAD", which computes the sputtering yield (amount of impurity) on the limiter surface based on incident ion characteristics and predicts the spatial distribution of impurities. The model provides a robust method for understanding and analyzing the impurity sputtering process from limiter surfaces, which is crucial for preventing ICRH surface erosion and reducing edge and core plasma contamination.
    A program for modeling the RF wave propagation of ICRF antennas utilizing the finite element method
    Lei-Yu Zhang(张雷宇), Yi-Xuan Li(李屹轩), Ming-Yue Han(韩明月), and Quan-Zhi Zhang(张权治)
    Chin. Phys. B, 2025, 34 (4): 045201.   DOI: 10.1088/1674-1056/adaccc
    Abstract96)   HTML0)    PDF (1151KB)(68)      
    Controlled nuclear fusion represents a significant solution for future clean energy, with ion cyclotron range of frequency (ICRF) heating emerging as one of the most promising technologies for heating the fusion plasma. This study primarily presents a self-developed 2D ion cyclotron resonance antenna electromagnetic field solver (ICRAEMS) code implemented on the MATLAB platform, which solves the electric field wave equation by using the finite element method, establishing perfectly matched layer (PML) boundary conditions, and post-processing the electromagnetic field data. This code can be utilized to facilitate the design and optimization processes of antennas for ICRF heating technology. Furthermore, this study examines the electric field distribution and power spectrum associated with various antenna phases to investigate how different antenna configurations affect the electromagnetic field propagation and coupling characteristics.
    Identifying important nodes of hypergraph: An improved PageRank algorithm
    Yu-Hao Piao(朴宇豪), Jun-Yi Wang(王俊义), and Ke-Zan Li(李科赞)
    Chin. Phys. B, 2025, 34 (4): 048902.   DOI: 10.1088/1674-1056/adb269
    Abstract178)   HTML0)    PDF (871KB)(75)      
    Hypergraphs can accurately capture complex higher-order relationships, but it is challenging to identify their important nodes. In this paper, an improved PageRank (ImPageRank) algorithm is designed to identify important nodes in a directed hypergraph. The algorithm introduces the Jaccard similarity of directed hypergraphs. By comparing the numbers of common neighbors between nodes with the total number of their neighbors, the Jaccard similarity measure takes into account the similarity between nodes that are not directly connected, and can reflect the potential correlation between nodes. An improved susceptible-infected (SI) model in directed hypergraph is proposed, which considers nonlinear propagation mode and more realistic propagation mechanism. In addition, some important node evaluation methods are transferred from undirected hypergraphs and applied to directed hypergraphs. Finally, the ImPageRank algorithm is used to evaluate the performance of the SI model, network robustness and monotonicity. Simulations of real networks demonstrate the excellent performance of the proposed algorithm and provide a powerful framework for identifying important nodes in directed hypergraphs.
    Model-free prediction of chaotic dynamics with parameter-aware reservoir computing
    Jianmin Guo(郭建敏), Yao Du(杜瑶), Haibo Luo(罗海波), Xuan Wang(王晅), Yizhen Yu(于一真), and Xingang Wang(王新刚)
    Chin. Phys. B, 2025, 34 (4): 040505.   DOI: 10.1088/1674-1056/adb733
    Abstract126)   HTML0)    PDF (12791KB)(84)      
    Model-free, data-driven prediction of chaotic motions is a long-standing challenge in nonlinear science. Stimulated by the recent progress in machine learning, considerable attention has been given to the inference of chaos by the technique of reservoir computing (RC). In particular, by incorporating a parameter-control channel into the standard RC, it is demonstrated that the machine is able to not only replicate the dynamics of the training states, but also infer new dynamics not included in the training set. The new machine-learning scheme, termed parameter-aware RC, opens up new avenues for data-based analysis of chaotic systems, and holds promise for predicting and controlling many real-world complex systems. Here, using typical chaotic systems as examples, we give a comprehensive introduction to this powerful machine-learning technique, including the algorithm, the implementation, the performance, and the open questions calling for further studies.