Home Page

Paweł Syty
Research areas


Interatomic potentials

   in physics

EGAS 2009

Offer of cooperation

Page administration

Computer code for calculating scattering phase shifts using the J-matrix method
(both non-relativistic and relativistic variants of the method)

Last update: 29/01/2007


The J-matrix method is one of the algebraic methods in quantum scattering theory. It allows to find an approximate solution of the scattering problem on the radial potential V=V(r), vanishing faster than the Coulomb one. The method is based on fact, that the radial kinetic energy operator is tridiagonal in some suitable bases - forms so called Jacobi matrix. See documentation for full theoretical description of the method.

The main goal of one of the scientific projects realized in our Department, is further developing the J-matrix method as well as the computer code JMATRIX, implementing the method and allowing for calculations of both relativistic and non-relativistic phase shifts. The project started in 1999. After developing the relativistic variant of the method by Pawel Horodecki, it became necessary to check validity of the method in real calculations. The author of the first version of the JMATRIX code (prepared as a part of his MSc thesis), as well as the next versions, was Pawel Syty. Test calculations, performed on some model potentials, has proved correctness of the method, however, it became evident, that programming the method is inherently connected with many numerical problems. After these first results were published (see publications), the project was suspended, and the authors were engaged to work on the other projects.

In the current year the project has been revived. Computer code has been significantly improved, time of calculations greatly reduced, and some new useful functions introduced. Moreover, there is a work in progress on improving the method itself, to achieve a faster convergence.

The main idea of this page is to release effects of our work on developing the J-matrix method, in particular the code JMATRIX. In addition, Wolfram Research's Mathematica notebooks are available, allowing for visual tracing how the method works, and some other related stuff.

Author gives permission to use and modify provided codes and notebooks freely, under the following conditions.

Program features

  • Implements both relativistic and non-relativistic variants of the J-matrix method
  • Two basis sets available: Gaussian and Laguerre
  • Allows for tracing convergence of numerical phase shifts along with increasing basis size
  • Pre-defined some model potentials: square-well, Coulomb-like and Yukawa potentials
  • Allows for specifying arbitrary user potential, given in analytical form
  • Saves the truncated potential to a file for a future re-use
  • Allows for calculations for set of projectile energies with relatively small computational time
  • Calculates analytical phase shift and root-mean-squared error in case of square-well potential
  • Averages results between groups of numerical phase shifts
  • Fully commented, self contained and portable Fortran 95 source code
  • Simple compilation using provided Makefile
  • Works with single, easy to use input file, results are written to files and displayed on screen
  • Adapted to be run on multiprocessor computers (using OpenMP parallel programming model)

Fortran 95 sources

Current version: 2.01 / 28.01.2007 [gzipped tar archive] [rar archive]     [changelog]

You need a Fortran 95 compiler to build executables from provided sources. See links below for free Fortran 95 compilers. The package also includes basic documentation and sample input file.

Previous versions (obsolete):
1.0 / 17.02.1999 [gzipped tar archive] [rar archive] (Fortran 77)
1.5 / 30.07.2003 [gzipped tar archive] [rar archive] (Fortran 90)
2.0 / 24.01.2007 [gzipped tar archive] [rar archive]


We provide some precompiled binary executables for the most popular operating systems, they are built from the current sources. However, to achieve the best performance, consider compiling program on the destination machine, from the provided sources. Moreover, in case of using provided binaries, it is not possible to specify user-potential, since it requires recompilation of the code. You also need to prepare the input file to start the calculations, sample file you can find here.

Linux x86 [gzip archive] [rar archive]
Linux x86 OpenMP [gzip archive] [rar archive]
Linux x86_64/EMT64 [gzip archive] [rar archive]
Linux x86_64/EMT64   OpenMP   [gzip archive]  [rar archive]
Windows   x86 [gzip archive] [rar archive]

Mathematica 5 notebooks

Provided notebooks may be useful in understanding the method, however, in real calculations Fortran 95 code is much quicker, therefore highly recommended. If you don't have access to the Mathematica package, you may use free MathReader, but only for reading.

Version 2.0 / 24.01.2007 (relativistic case) [Mathematica notebook]
Version 2.0 / 24.01.2007 (non-relativistic case) [Mathematica notebook]


Short readme [text file] (for version 1.5, new version in preparation)
Full documentation  [Adobe PDF] (for version 1.5, new version in preparation)
Changelog [text file]
To-do list [text file]
Example input file [text file]


The list is rather short, because the project was suspended in the years 2000-2006.

P. Syty, Programming the J-matrix method, MSc thesis, Gdansk University of Technology (1999)
P. Syty, The J-matrix method: numerical computations, TASK Quarterly 3 No. 3 (1999)
P. Horodecki, Relativistic J-matrix method, Phys. Rev. A 62, 052716 (2000)

Example calculations and results (graphs in the Adobe PDF format)

1. Scattering from square-well potential: V(r)=V0 for a<=r<=b, 0 for r<a or r>b. Non-relativistic and relativistic calculations for V0=-1, a=0.8, b=1. Projectile parameters: l=1, kappa=1, E=3 a.u.

Non-relativistic calculations, fixed energy,
basis size increased up to N=4000
[Gaussian basis]
[Laguerre basis]
As above, enlargement in the neigbourhood of N=4000
together with analytical result
[Gaussian basis]
[Laguerre basis]
As above, root-mean-squared error [both bases]
Fixed basis size, N=4000,
energy changed in range E=0-25 a.u.
together with analytical result
[both bases]
Fixed energy, basis size increased up to N=1000,
comparison of relativistic and non-relativistic results
[Gaussian basis]
[Laguerre basis]

2. Scattering from truncated Coulomb potential: V(r)=-Z/r for r<=r0, 0 for r>r0. Non-relativistic calculations for Z=30, r0=1. Projectile parameters: l=1, kappa=1, E=3 a.u.

Non-relativistic calculations, fixed energy,
basis size increased up to N=3000
[Gaussian basis]
[Laguerre basis]
As above, enlargement in the neigbourhood of N=3000
together with averaged result
[Gaussian basis]
[Laguerre basis]
Fixed basis size, N=3000,
energy changed in range E=0-10 a.u.
[both bases]

3. Scattering from truncated Coulomb potential: V(r)=-Z/r for r<=r0, 0 for r>r0. Relativistic calculations for Z=30, r0=1. Projectile parameters: various l and kappa, E=0.4 a.u.

In preparation

4. Scattering from Yukawa potential: V(r)=-g2Exp(-mr)/r for r<=r0, 0 for r>r0. Non-relativistic calculations for g=1, m=1, r0=1. Projectile parameters: l=1, kappa=1, E=3 a.u.

In preparation


Some utilities related to project (i.e. applications to create input files) will be published soon.


The G95 project - free Fortran 95 compiler, available for multiple cpu architectures and operating systems
GFortran - free Fortran 95/2003 compiler for GCC, the GNU Compiler Collection
Intel(r) Fortran Compiler - free non-commercial Fortran 95 compiler for Linux


All comments and suggestions concerning the method, code or this WWW-page are welcome. Please send them to code developer's e-mail address: sylas@mif.pg.gda.pl

Webmaster v. 1.3.0