makefort10.x

Description

makefort10 is a TurboRVB utility that creates an initial wave function file (fort.10) for solids and open systems. It reads only from standard input and writes fort.10_new, structure.xsf, and symmetries.dat (plus optionally makefort10.log).

  • Input: Standard input only. Namelists &system, &electrons, &symmetries, followed by the ATOMIC_POSITIONS section (atomic positions), ATOM_<Z> blocks per atomic species (&shells and orbital definitions), and optionally ATOMIC_SPECIES (when readatoms=.true.), UNPAIRED (odd electrons or readunpaired=.true.).

  • Output: fort.10_new — TurboRVB wave function file (cell, ions, orbitals, Det matrix, Jastrow). Use as fort.10 for VMC/DMC. Also structure.xsf (for visualization), symmetries.dat (symmetry operations), and makefort10.log when write_log=.true..

  • Processing: The program reads cell, positions, electron count, orbital type, Jastrow type, and symmetries; finds Bravais lattice rotations and translations; builds initial orbital coefficients and Det/Jastrow matrices constrained by symmetry; and writes fort.10_new via an internal write_fort10.

Typical use: generating fort.10 from scratch for a new VMC/DMC run, or preparing the fort.10_out structure for convertfort10.

Command line: --help, -help, or help prints online help and exits (help_online('makefort10')). The program is serial (no MPI).

Input and output

Input

All input is read from standard input (unit 5) via read_input(5). Use e.g. ./makefort10.x < makefort10.input.

  • &system (required): Cell and system. natoms, ntyp, posunits (bohr | angstrom | crystal), nxyz, celldm or at, phase, pbcfort10, complexfort10, rs_read, nel_read, L_read, yes_pfaff, yes_tilted, unit_crystal, etc. At least one of nel, rs_read, L_read must be set (otherwise the program stops).

  • &electrons (required): nel, neldiff, numpaired, twobody, twobodypar, filling, noonebody, readatoms, orbtype, jorbtype, vecpbc, symmagp, readunpaired, etc.

  • &symmetries (required): nosym, notra, eqatoms, nosym_contr, nosym_contrj, rot_det, rot_jas, rot_pfaff, symmagp, forces_sym, etc.

  • ATOMIC_POSITIONS (required): Section header followed by natoms lines. Each line: zeta(2), zeta(1), rion(1:3) (atomic number, valence electrons, coordinates). Interpreted according to posunits (bohr, angstrom, or crystal).

  • ATOMIC_SPECIES: Only when readatoms=.true.. ntyp lines of atomic number and wave function file name.

  • ATOM_<Z> blocks: One block per atomic species (Z = atomic number). Each block contains &shells (nshelldet, nshelljas, etc.) and orbital definitions for Det and Jastrow (mixed / tempered / normal format). When readatoms=.false., orbitals are defined here.

  • UNPAIRED: For odd-electron systems or when readunpaired=.true.. norb_unpaired and (atom index, orbital number) pairs.

See template/makefort10.input for an example. A detailed list of namelist variables is described below.

Output

  • fort.10_new: Generated wave function (TurboRVB format). Overwrites existing file. Rename or copy to fort.10 for VMC/DMC.

  • structure.xsf: Structure file for XCrysden (PRIMVEC/PRIMCOORD or ATOMS).

  • symmetries.dat: Number and names of symmetry operations used.

  • makefort10.log: Only when write_log=.true.. Debug/detail log.

Input parameters

Variable are read from standard input.

system section

Parameter name

Datatype

Default

Description

natoms

integer

uninitialized(maybe 0)?

Number of atoms.

posunits

character(len=10) :: posunits

"bohr"

Unit used when specifying molecular structures, crystal structures, and lattice constants. Choose from bohr, crystal, or angstrom.

nxyz

integer :: nxyz(3)

nxyz(:) = 1

Supercell size. You can independently specify integer values for nxyz(1), nxyz(2), and nxyz(3). Supercell extensions that deform the unit cell are not supported.

celldm

real(8) :: celldm(6)

celldm(1) = -1.d0
celldm(2) = 1.d0
celldm(3) = 1.d0
celldm(4:6) = Pi/2.d0

celldm. Specifies the lattice-vector lengths and inter-vector angles when defining a crystal structure. Follows the same convention as Quantum ESPRESSO.

at

real(8) :: at(3, 3)

at = 0.0

Not used.

phase

double precision :: phase(3)

phase(:) = 0.d0

Specifies the phase (k-vector) attached to spin-up electrons. The unit is the reciprocal lattice vector; i.e., the Brillouin-zone boundary corresponds to 0.5. Independent values can be set for the x, y, and z directions via phase(1), phase(2), and phase(3).

phasedo

double precision :: phasedo(3)

phasedo(:) = 0.d0

Specifies the phase (k-vector) attached to spin-down electrons. The unit is the reciprocal lattice vector; i.e., the Brillouin-zone boundary corresponds to 0.5. Independent values can be set for the x, y, and z directions via phase(1), phase(2), and phase(3).

pbcfort10

logical

.true.

Whether periodic boundary conditions are applied to the wave function.

complexfort10

logical

complexfort10 = .false. ! flag for creating a complex wave function

Whether the wave function is treated as complex-valued.

real_contracted

logical

.false.

Not used.

ntyp

integer :: ntyp ! Number of atomic types

ntyp = 0 ! not used if fort.10 are not read

Total number of element types in the system.

rs_read

real(8)

-1.d0

Not used.

write_log

logical

.false.

Not used.

axyz

integer :: axyz(3, 3)

3x3 Identity matrix

axyz = 0
do i = 1, 3
    axyz(i, i) = 1.d0
end do

Not used.

nel_read

integer

ignore input value?

Not used.

L_read

real(8)

-1.d0

Not used.

yes_pfaff

logical

.false.

Pfaffian wave function.

nodownpfaff

logical

.false.

Not used.

nouppfaff

logical

.false.

Not used.

yes_tilted

logical

.false.

Set to .true. when using a non-orthorhombic cell.

unit_crystal

character(len=12) :: unit_crystal

'conventional'

Not used.

electrons section

Parameter name

Datatype

Default

Description

twobody

integer

-6

Selects the functional form for the one-body and two-body Jastrow factors. See the wave-function format description for details.

twobodypar(AMDNone)

double precision, allocatable :: twobodypar(:)

allocate (twobodypar(2))
twobodypar(:) = 1.0d0

Selects the initial values for the two-body Jastrow factor.

filling

character(20) :: filling

"diagonal"

filling = diagonal: Fill the initial detmat(:,:) and jasmat(:,:) with 1.d0 on the diagonal. filling = random: Fill with random numbers between (0,1.d0). filling = semidiagonal: Fill off-diagonal elements with random numbers between (0,0.1d0) and diagonal elements with 1.d0.

noonebody

logical

.false.

Not used.

readatoms

logical

.false.

Not used.

orbtype

character(20) :: orbtype

"normal"

orbtype = normal: Use normal orbitals. orbtype = mixed: Use mixed orbitals. orbtype = tempered: Use tempered orbitals. The same applies for Jastrow orbitals with jorbtype.

nel

integer

sum(zeta(2, 1:natoms))

Total number of electrons (sum of spin-up and spin-down). If not specified, it is assumed to be equal to the total nuclear charge (i.e., net charge zero).

neldiff

integer

By default, the code determines the spin multiplicity from the total number of electrons nel (typically singlet, doublet, or triplet). To set a higher-spin state, you must provide an explicit input value.

In Pfaffian mode (ipf == 2), the file format stores the total electron count with a negative sign (i.e., -nel). Therefore, do not specify neldiff directly as nelup − neldown. Instead, set neldiff from the parity of nel: use neldiff = 0 for even nel (closed-shell) and neldiff = 1 for odd nel (one unpaired electron). For higher-spin states, adjust the number of unpaired electrons accordingly (e.g., neldiff = 2 for two unpaired electrons, neldiff = 3 for three, etc.).

numpaired

integer

0

Not used.

jorbtype

character(20) :: jorbtype

"normal"

Not used.

onlycontrdet

logical

.false.

Not used.

onlycontrjas

logical

.false.

Not used.

shiftbeta

integer

shiftbeta = 1 ! default value for shiftbeta

Not used.

readunpaired

logical

.false.

Not used.

vecpbc

integer :: vecpbc(3)

  • vecpbc(1:3) = 1 if apbc(1:3) is .true.

  • vecpbc(1:3) = 0 if apbc(1:3) is .false.

Not used.

yesbump

logical

yesbump = .false. ! default value for yesbump

Not used.

onebodypar(PORT, AMDNone)

double precision, allocatable :: onebodypar(:)

allocate (onebodypar(ntyp)) onebodypar = 0.0d0

Selects the initial values for the two-body Jastrow factor.

niesd

integer

  • ignore input value

  • niesd must equal to n_onebody + n_twobody

  • otherwise program fails

Not used.

yes_crystal

logical

  • .true. if no input

  • ignore input

    • .true. if complexfort10 is .true. and pbcfort10 is .true.

When periodic boundary conditions are enabled, controls whether CRYSTAL BASIS is used for the determinant orbitals. If not used, the periodic boundary conditions are real-valued.

yes_crystalj

logical

.false.

When periodic boundary conditions are enabled, controls whether CRYSTAL BASIS is used for the Jastrow orbitals. If not used, the periodic boundary conditions are real-valued.

no_4body_jas

logical

.false.

For the three-body/four-body part of the Jastrow factor, controls whether the four-body terms—i.e., Jastrow factors for electron pairs belonging to different atoms—are enabled.

nopseudo

logical

.false.

Not used.

scale_jasfat

real*8

0.d0

Not used.

symmetries section

Parameter name

Datatype

Default

Description

nosym

logical

.false.

If true, disables all symmetry operations.

notra

logical

.false.

If true, disables translational symmetry.

forces_sym

logical

.false.

Not used.

notra_forces

logical

  • .false. if no input

  • ignore input

    • notra if forces_sym is .false.

Not used.

nosym_forces

logical

  • .false. (no input)

  • nosym (ignore input value) if forces_sym is .false.

Not used.

eqatoms

logical

.true.

If eqatoms = .true., set the same value for all the exponents of the atomic basis if acting on the same type of atom. If eqatoms = .false., exponents corresponding to different atomic positions are equal only if related by spatial symmetries.

eq_intatoms

logical

.true.

Not used.

rot_det

logical

.true.

If true, enforces rotational symmetry on the pairing functions in the determinant part.

rot_jas

logical

.true.

If true, enforces rotational symmetry on the pairing functions in the Jastrow part.

rot_pfaff

logical

.false.

If true, enforces rotational symmetry on the pairing functions in the Pfaffian part.

nosym_contr

logical

.false.

If true, does not impose symmetry on the contractions in the determinant part.

nosym_contrj

logical

.false.

If true, does not impose symmetry on the contractions in the Jastrow part.

symmagp

logical

.true.

If true, imposes antisymmetry on the AGP matrix, i.e., the state becomes a pure spin singlet.

forcesymm

logical

.false.

forcesymm: WIP (to be documented).

shells section

Parameter name

Datatype

Default

Description

nshelljas

integer

0

Specifies the number of basis-function shells used for the Jastrow part.

nshelldet

integer

0

Specifies the number of basis-function shells used for the determinant part.

njas_hyb

integer

0

If specified, adds that many hybrid orbitals to the Jastrow part.

ndet_hyb

integer

0

If specified, adds that many hybrid orbitals to the determinant part.

no_3body_jas

logical

.false.

Not used.

ncut_hyb

integer

-1

Not used.

ATOMIC POSITIONS section

Parameter name

Datatype

Default

Description

ATOMIC_POSITIONS

WIP

WIP

Specifies atomic positions, using the same convention as Quantum ESPRESSO.

ATOMIC SPECIES section

Parameter name

Datatype

Default

Description

ATOMIC_SPECIES

WIP

WIP

Specifies atomic species, using the same convention as Quantum ESPRESSO.

UNPAIRED section

Parameter name

Datatype

Default

Description

UNPAIRED

WIP

WIP

Not used.

ATOM number section(test)

Parameter name

Datatype

Default

Description

"ATOM_"//trim(intc(zeta(1, i1)))

WIP

WIP

Not used.

Notes

Required parameters (nel, rs_read, L_read)

  • At least one of nel, rs_read, L_read must be set (in &system or &electrons). If all remain at default -1, the program stops with "Error you have to set nel , rs_read or L_read!!".

celldm and at

  • celldm(:) and at(:,:) must not both be set. The program stops with "Use celldm(:) or at(:,:) but not both!!". Use one or the other for the cell definition.

posunits and pbcfort10

  • posunits="crystal" is not allowed with pbcfort10=.false. (program stops). For open boundaries use bohr or angstrom.

  • posunits must be one of bohr, angstrom, crystal. Otherwise "Unknown units" and stop.

Orthorhombic cell

  • When axyz is used, only orthorhombic cells are supported. The program stops with "Only Orthorombic cells supported! check axyz(:,:)" otherwise. Non-orthorhombic cells may be handled via internal conversion (no_orthorombic) in other code paths.

UNPAIRED section

  • Atom and orbital indices in the UNPAIRED section must match the determinant orbital list (detorb: kion, norbatom). If any pair does not match, the program stops with "Error in UNPAIRED section check orbital numbers!".

Phase (real wave function)

  • For a real wave function, phase must be 0 or 0.5 for each direction. Otherwise the program stops and suggests using the complex wave function (PBC_C).

Output file name

  • The wave function is always written to fort.10_new, not fort.10. For VMC/DMC, copy or rename to fort.10 as needed.

Troubleshooting

Fatal errors (program stops)

  • Error you have to set nel , rs_read or L_read!! — All three are unset (-1). Set at least one in &system or &electrons.

  • Error reading 'system' namelist! — Syntax or read failure in &system. Check the block format; use template/makefort10.input as reference.

  • Error reading 'electrons' namelist! — Same for &electrons.

  • Error reading 'symmetries' namelist! — Same for &symmetries.

  • Error reading ATOMIC_POSITIONS! — Section not found or wrong number of lines. Ensure the section header and natoms data lines are correct.

  • Error reading ATOMIC_SPECIES! — When readatoms=.true., section or data invalid. Check section and ntyp lines.

  • Error reading ATOMIC_WF! — Failure reading atomic wave function data (e.g. external file). Check file names and format.

  • Error reading UNPAIRED! — UNPAIRED section missing or malformed. Check section and norb_unpaired line.

  • Use celldm(:) or at(:,:) but not both!! — Both are set. Use only one.

  • Only Orthorombic cells supported! check axyz(:,:) — Non-orthorhombic axyz. Use an orthorhombic cell.

  • You cannot use "crystal" units with pbcfort10=.false. — Incompatible options. Set pbcfort10=.true. or use another posunits.

  • Unknown units — posunits not bohr, angstrom, or crystal. Fix posunits.

  • Atom type not found! — With readatoms=.true., an atom’s atomic number does not match any entry in ATOMIC_SPECIES. Align atomic numbers.

  • Error in UNPAIRED section check orbital numbers! — An (atom, orbital) pair in UNPAIRED is not in the determinant orbital list. Use valid indices (detorb kion, norbatom).

  • Symmetries with phase != 0 or 0.5 not implemented for real wave function! — Real wave function with phase other than 0 or 0.5. Use complex wave function (PBC_C) or set phase to 0 or 0.5.

  • Error!! niesd is inconsistent — In write_fort10, niesd does not match expectations. Check Jastrow type and symmetry settings.

  • ERROR you should check your primitive cell — Primitive cell consistency error. Check cell, positions, nxyz.

Warnings

  • Warning celldm(1) set to 50 ! — pbcfort10=.false. and celldm(1) was unset; default 50 is used. Set celldm(1) explicitly if needed.

  • Warning ntyp == 0 ! — ntyp is 0. Set atomic types correctly (may continue depending on build).

Other notes

  • fort.10_new is overwritten if it exists. Back it up if needed.

  • Orbital block format (mixed / tempered / normal, ATOM_* layout) is described in the source (read_orbitals) and in template/makefort10.input.