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 (&shellsand orbital definitions), and optionally ATOMIC_SPECIES (whenreadatoms=.true.), UNPAIRED (odd electrons orreadunpaired=.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 |
|
uninitialized(maybe 0)? |
Number of atoms. |
posunits |
|
|
Unit used when specifying molecular structures, crystal structures, and lattice constants. Choose from bohr, crystal, or angstrom. |
nxyz |
|
|
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 |
|
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 |
|
|
Not used. |
phase |
|
|
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 |
|
|
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 |
|
|
Whether periodic boundary conditions are applied to the wave function. |
complexfort10 |
|
complexfort10 = |
Whether the wave function is treated as complex-valued. |
real_contracted |
|
|
Not used. |
ntyp |
|
ntyp = |
Total number of element types in the system. |
rs_read |
|
|
Not used. |
write_log |
|
|
Not used. |
axyz |
|
3x3 Identity matrix axyz = 0
do i = 1, 3
axyz(i, i) = 1.d0
end do
|
Not used. |
nel_read |
|
ignore input value? |
Not used. |
L_read |
|
|
Not used. |
yes_pfaff |
|
|
Pfaffian wave function. |
nodownpfaff |
|
|
Not used. |
nouppfaff |
|
|
Not used. |
yes_tilted |
|
|
Set to .true. when using a non-orthorhombic cell. |
unit_crystal |
|
|
Not used. |
electrons section
Parameter name |
Datatype |
Default |
Description |
|---|---|---|---|
twobody |
|
|
Selects the functional form for the one-body and two-body Jastrow factors. See the wave-function format description for details. |
twobodypar(AMDNone) |
|
allocate (twobodypar(2))
twobodypar(:) = 1.0d0
|
Selects the initial values for the two-body Jastrow factor. |
filling |
|
|
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 |
|
|
Not used. |
readatoms |
|
|
Not used. |
orbtype |
|
|
orbtype = normal: Use normal orbitals. orbtype = mixed: Use mixed orbitals. orbtype = tempered: Use tempered orbitals. The same applies for Jastrow orbitals with jorbtype. |
nel |
|
|
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 |
|
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 |
|
|
Not used. |
jorbtype |
|
|
Not used. |
onlycontrdet |
|
|
Not used. |
onlycontrjas |
|
|
Not used. |
shiftbeta |
|
shiftbeta = |
Not used. |
readunpaired |
|
|
Not used. |
vecpbc |
|
|
Not used. |
yesbump |
|
yesbump = |
Not used. |
onebodypar(PORT, AMDNone) |
|
allocate (onebodypar(ntyp)) onebodypar = 0.0d0 |
Selects the initial values for the two-body Jastrow factor. |
niesd |
|
|
Not used. |
yes_crystal |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
Not used. |
scale_jasfat |
|
|
Not used. |
symmetries section
Parameter name |
Datatype |
Default |
Description |
|---|---|---|---|
nosym |
|
|
If true, disables all symmetry operations. |
notra |
|
|
If true, disables translational symmetry. |
forces_sym |
|
|
Not used. |
notra_forces |
|
|
Not used. |
nosym_forces |
|
|
Not used. |
eqatoms |
|
|
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 |
|
|
Not used. |
rot_det |
|
|
If true, enforces rotational symmetry on the pairing functions in the determinant part. |
rot_jas |
|
|
If true, enforces rotational symmetry on the pairing functions in the Jastrow part. |
rot_pfaff |
|
|
If true, enforces rotational symmetry on the pairing functions in the Pfaffian part. |
nosym_contr |
|
|
If true, does not impose symmetry on the contractions in the determinant part. |
nosym_contrj |
|
|
If true, does not impose symmetry on the contractions in the Jastrow part. |
symmagp |
|
|
If true, imposes antisymmetry on the AGP matrix, i.e., the state becomes a pure spin singlet. |
forcesymm |
|
|
forcesymm: WIP (to be documented). |
shells section
Parameter name |
Datatype |
Default |
Description |
|---|---|---|---|
nshelljas |
|
|
Specifies the number of basis-function shells used for the Jastrow part. |
nshelldet |
|
|
Specifies the number of basis-function shells used for the determinant part. |
njas_hyb |
|
|
If specified, adds that many hybrid orbitals to the Jastrow part. |
ndet_hyb |
|
|
If specified, adds that many hybrid orbitals to the determinant part. |
no_3body_jas |
|
|
Not used. |
ncut_hyb |
|
|
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.