Like in xtb the .CHRG and .UHF files can be used to specify the total charge and number of unpaired electrons, respectively. However, this behavior seems somewhat uninituitive in case a path to a coordinate file is given while .CHRG / .UHF can only be in the working directory.
|
inquire(file='.CHRG', exist=exist) |
|
if (exist) then |
|
open(file='.CHRG', newunit=unit) |
|
read(unit, *, iostat=stat) charge |
|
if (stat == 0) then |
|
mol%charge = charge |
|
if (config%verbosity > 0) call info(ctx, "Molecular charge read from .CHRG") |
|
else |
|
if (config%verbosity > 0) call warn(ctx, & |
|
"Could not read molecular charge read from .CHRG") |
|
end if |
|
close(unit) |
|
end if |
An alternative implementation using the dirname of the coordinate file can be found in mctc-convert.
cc @marvinfriede
Like in
xtbthe.CHRGand.UHFfiles can be used to specify the total charge and number of unpaired electrons, respectively. However, this behavior seems somewhat uninituitive in case a path to a coordinate file is given while.CHRG/.UHFcan only be in the working directory.tblite/app/driver_run.f90
Lines 93 to 105 in 5db81cc
An alternative implementation using the dirname of the coordinate file can be found in
mctc-convert.cc @marvinfriede