Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parser-siesta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nomad-lab
parser-siesta
Commits
7505b8b1
Commit
7505b8b1
authored
Mar 20, 2019
by
Daniel Speckhard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing src.
parent
63c52686
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
1250 deletions
+0
-1250
parser/parser-siesta/check.sh
parser/parser-siesta/check.sh
+0
-9
parser/parser-siesta/inputvars.py
parser/parser-siesta/inputvars.py
+0
-386
parser/parser-siesta/main.py
parser/parser-siesta/main.py
+0
-672
parser/parser-siesta/mkjson.py
parser/parser-siesta/mkjson.py
+0
-123
parser/parser-siesta/nomad_meta_info
parser/parser-siesta/nomad_meta_info
+0
-1
parser/parser-siesta/pycheck.py
parser/parser-siesta/pycheck.py
+0
-35
parser/parser-siesta/setup_paths.py
parser/parser-siesta/setup_paths.py
+0
-23
parser/parser-siesta/test
parser/parser-siesta/test
+0
-1
No files found.
parser/parser-siesta/check.sh
deleted
100755 → 0
View file @
63c52686
#!/bin/bash
python main.py
test
/H2O/out
--annotate
2>&1 |
tee test
/H2O/json
python main.py
test
/H2O-relax/out
--annotate
2>&1 |
tee test
/H2O-relax/json
python main.py
test
/Al-bulk/out
--annotate
2>&1 |
tee test
/Al-bulk/json
python main.py
test
/Al-slab/out
--annotate
2>&1 |
tee test
/Al-slab/json
python main.py
test
/MgO/out
--annotate
2>&1 |
tee test
/MgO/json
python main.py
test
/smeagol-Au-leads/Au.out
--annotate
2>&1 |
tee test
/smeagol-Au-leads/json
python main.py
test
/smeagol-Au-scregion/Au.out
--annotate
2>&1 |
tee test
/smeagol-Au-scregion/json
parser/parser-siesta/inputvars.py
deleted
100644 → 0
View file @
63c52686
# Copyright 2016-2018 Ask Hjorth Larsen, Fawzi Mohamed
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
varlist
=
[
'%endblock'
,
'Atom-Setup-Only'
,
'Atom.Debug.KB.Generation'
,
'AtomCoorFormatOut'
,
'AtomLeftVcte'
,
'AtomRightVcte'
,
'AtomicCoordinatesFormat'
,
'BasisPressure'
,
'BornCharge'
,
'BuildSuperCell'
,
'BulkLead'
,
'BulkTransport'
,
'BulkTransvCellSize'
,
'BulkTransvCellSizeX'
,
'BulkTransvCellSizeY'
,
'BulkTransvCellSizeZ'
,
'CB.MaxKappa'
,
'CB.WriteComplexBands'
,
'CDFT'
,
'CDFT.MaxIter'
,
'COOP.Write'
,
'CalcIETS'
,
'CalcMPSH'
,
'ChangeKgridInMD'
,
'Compat-pre-v4-DM-H'
,
'DM.AllowExtrapolation'
,
'DM.AllowReuse'
,
'DM.EnergyTolerance'
,
'DM.FIRE.Mixing'
,
'DM.FormattedFiles'
,
'DM.FormattedInput'
,
'DM.FormattedOutput'
,
'DM.HarrisTolerance'
,
'DM.KickMixingWeight'
,
'DM.MixSCF1'
,
'DM.MixingWeight'
,
'DM.NormalizationTolerance'
,
'DM.NormalizeDuringSCF'
,
'DM.NumberBroyden'
,
'DM.NumberKick'
,
'DM.NumberPulay'
,
'DM.OccupancyTolerance'
,
'DM.Pulay.Avoid.First.After.Kick'
,
'DM.PulayOnFile'
,
'DM.RequireEnergyConvergence'
,
'DM.RequireHarrisConvergence'
,
'DM.Tolerance'
,
'DM.UseSaveDM'
,
'Delta'
,
'DeltaWorkfunction'
,
'Diag.AllInOne'
,
'Diag.DivideAndConquer'
,
'Diag.Memory'
,
'Diag.NoExpert'
,
'Diag.ParallelOverK'
,
'Diag.PreRotate'
,
'Diag.Use2D'
,
'DiagMemory'
,
'DiagScale'
,
'DirectPhi'
,
'DivideAndConquer'
,
'EM.AddRhoGate'
,
'EM.AddVgIsolatedLocalCharges'
,
'EM.COOPCalculate'
,
'EM.COOPNumberOfBonds'
,
'EM.DebugRhoGate'
,
'EM.NetRhoGateCharge'
,
'EM.PrintLimits'
,
'EM.RhoGateLxMax'
,
'EM.RhoGateLxMin'
,
'EM.RhoGateLyMax'
,
'EM.RhoGateLyMin'
,
'EM.RhoGateLzMax'
,
'EM.RhoGateLzMin'
,
'EM.TRCAddVCDFT'
,
'EM.TimeReversal'
,
'EM.Timings'
,
'EM.addV'
,
'EMPDOSKSO'
,
'EMTransport'
,
'ElectronicTemperature'
,
'EnergLowestBound'
,
'FilterCutoff'
,
'FilterTol'
,
'FinalTransmRange'
,
'FixAuxiliaryCell'
,
'FixAuxillaryCell'
,
'FixSpin'
,
'ForceAuxCell'
,
'FullRamp'
,
'HSetupOnly'
,
'Harris_functional'
,
'HartreeLeadsBottom'
,
'HartreeLeadsLeft'
,
'HartreeLeadsRight'
,
'Ik_Select'
,
'InitTransmRange'
,
'InitTransport'
,
'KB.New.Reference.Orbitals'
,
'KB.Rmax'
,
'LDAU.units'
,
'LDAUForces'
,
'LDAU_METHOD'
,
'LatticeConstant'
,
'LongOutput'
,
'MD.AnnealOption'
,
'MD.BulkModulus'
,
'MD.FCAcousticSumRule'
,
'MD.FCAtomRestart'
,
'MD.FCAxisRestart'
,
'MD.FCDispl'
,
'MD.FCEigenVectors'
,
'MD.FCIR'
,
'MD.FCRead'
,
'MD.FCfirst'
,
'MD.FClast'
,
'MD.FinalTimeStep'
,
'MD.FireQuench'
,
'MD.InitialTemperature'
,
'MD.InitialTimeStep'
,
'MD.LengthTimeStep'
,
'MD.MaxCGDispl'
,
'MD.MaxForceTol'
,
'MD.MaxStressTol'
,
'MD.NoseMass'
,
'MD.NumCGsteps'
,
'MD.NumNEBsteps'
,
'MD.ParrinelloRahmanMass'
,
'MD.Quench'
,
'MD.RelaxCellOnly'
,
'MD.RemoveIntraMolecularPressure'
,
'MD.TRCSampling'
,
'MD.TRCSkip'
,
'MD.TargetPressure'
,
'MD.TargetTemperature'
,
'MD.TauRelax'
,
'MD.Timing'
,
'MD.TypeOfRun'
,
'MD.UseSaveCG'
,
'MD.UseSaveNEB'
,
'MD.UseSaveXV'
,
'MD.UseSaveZM'
,
'MD.UseStructFile'
,
'MD.VariableCell'
,
'MM.Cutoff'
,
'MM.UnitsDistance'
,
'MM.UnitsEnergy'
,
'MPSHAtomFirst'
,
'MPSHAtomLast'
,
'MPSHOrbFirst'
,
'MPSHOrbLast'
,
'MaxBondDistance'
,
'MaxSCFIterations'
,
'MeshCutoff'
,
'MeshSubDivisions'
,
'MinSCFIterations'
,
'MixCharge'
,
'MixHamiltonian'
,
'MixedParallel'
,
'MonitorForcesInSCF'
,
'MullikenInSCF'
,
'NC.OrbitalRotationEnd'
,
'NC.OrbitalRotationStart'
,
'NEB.SkipEdge'
,
'NEnergReal'
,
'NIVPoints'
,
'NPoles'
,
'NSlices'
,
'NTransmPoints'
,
'NaiveAuxiliaryCell'
,
'NeglNonOverlapInt'
,
'NenergImCircle'
,
'NenergImLine'
,
'NetCharge'
,
'NonCollinearSpin'
,
'NumSkipWriteDM'
,
'NumberLinearMix'
,
'NumberOfAtoms'
,
'NumberOfEigenStates'
,
'NumberOfSpecies'
,
'Number_of_species'
,
'ON.ChemicalPotential'
,
'ON.ChemicalPotentialOrder'
,
'ON.ChemicalPotentialRc'
,
'ON.ChemicalPotentialTemperature'
,
'ON.ChemicalPotentialUse'
,
'ON.MaxNumIter'
,
'ON.UseSaveLWF'
,
'ON.eta'
,
'ON.eta_alpha'
,
'ON.eta_beta'
,
'ON.etol'
,
'ON.functional'
,
'OccupationFunction'
,
'On.RcLWF'
,
'OpticalCalculation'
,
'Optim.Broyden'
,
'Output-Structure-Only'
,
'PAO.BasisSize'
,
'PAO.BasisType'
,
'PAO.EnergyShift'
,
'PAO.Filter'
,
'PAO.FixSplitTable'
,
'PAO.Keep.Findp.Bug'
,
'PAO.NewSplitCode'
,
'PAO.OldStylePolorbs'
,
'PAO.SoftDefault'
,
'PAO.SoftInnerRadius'
,
'PAO.SoftPotential'
,
'PAO.SplitNorm'
,
'PAO.SplitNormH'
,
'PAO.SplitTailNorm'
,
'PS.SIC'
,
'ParallelOverK'
,
'PartialChargesAtEveryGeometry'
,
'PartialChargesAtEveryScfStep'
,
'PoissonMultigrid'
,
'Print_ldau'
,
'ProcessorGridX'
,
'ProcessorGridY'
,
'ProcessorGridZ'
,
'ProjectionInSCF'
,
'ProjectionMethod'
,
'RcSpatial'
,
'ReInitialiseDM'
,
'ReadHamiltonian'
,
'ReadKPIN'
,
'ReparametrizePseudos'
,
'Restricted.Radial.Grid'
,
'Rmax.Radial.Grid'
,
'RotateSpin.Phi'
,
'RotateSpin.Theta'
,
'SCF.LinearMixingAfterPulay'
,
'SCF.MixAfterConvergence'
,
'SCF.MixingWeightAfterPulay'
,
'SCF.Pulay.Damping'
,
'SCF.Pulay.DebugSVD'
,
'SCF.Pulay.RcondSVD'
,
'SCF.Pulay.UseSVD'
,
'SCF.PulayDmaxRegion'
,
'SCF.PulayMinimumHistory'
,
'SCF.Read.Charge.NetCDF'
,
'SCF.Read.Deformation.Charge.NetCDF'
,
'SCF.Recompute-H-After-Scf'
,
'SCF.Want.Variational.EKS'
,
'SCFMustConverge'
,
'SIC.Flavour'
,
'SIC.Lambda'
,
'SIC.NoRelaxation'
,
'SIC.Npop'
,
'SIC.PopDMConv'
,
'SIC.PopKgridFactor'
,
'SIC.PopSmatSparsity'
,
'SIC.ProjectionMode'
,
'SIC.ProjectionType'
,
'SIC.Rot_Inv'
,
'STT.Calculation'
,
'STT.LinearResponse'
,
'SaveBaderCharge'
,
'SaveDeltaRho'
,
'SaveElectrostaticPotential'
,
'SaveHS'
,
'SaveInitialChargeDensity'
,
'SaveIonicCharge'
,
'SaveNeutralAtomPotential'
,
'SaveRho'
,
'SaveRhoXC'
,
'SaveTotalCharge'
,
'SaveTotalPotential'
,
'Scissor.Operator'
,
'SetBulkTransvCell'
,
'Siesta2Wannier90.NumberOfBands'
,
'Siesta2Wannier90.NumberOfBandsDown'
,
'Siesta2Wannier90.NumberOfBandsUp'
,
'Siesta2Wannier90.WriteAmn'
,
'Siesta2Wannier90.WriteEig'
,
'Siesta2Wannier90.WriteMmn'
,
'Siesta2Wannier90.WriteUnk'
,
'Sigma.DSigmaDE'
,
'SignatureRecords'
,
'SimulateDoping'
,
'SingleExcitation'
,
'SkipLastIter'
,
'SlabDipoleCorrection'
,
'SolutionMethod'
,
'SpinConfLeads'
,
'SpinOrbit'
,
'SpinPolarized'
,
'SystemLabel'
,
'SystemName'
,
'TS.MixH'
,
'TimeReversal'
,
'TimeReversalSymmetryForKpoints'
,
'TrCoefficients'
,
'TryMemoryIncrease'
,
'UseDomainDecomposition'
,
'UseNewDiagk'
,
'UseSaveData'
,
'UseSpatialDecomposition'
,
'UseStructFile'
,
'UseTreeTimer'
,
'VFinal'
,
'VGate'
,
'VInitial'
,
'Vna.Filter'
,
'WarningMinimumAtomicDistance'
,
'WriteBands'
,
'WriteCoorCerius'
,
'WriteCoorInitial'
,
'WriteCoorStep'
,
'WriteCoorXmol'
,
'WriteDM'
,
'WriteDM.History.NetCDF'
,
'WriteDM.NetCDF'
,
'WriteDMHS.History.NetCDF'
,
'WriteDMHS.NetCDF'
,
'WriteDMT'
,
'WriteDenchar'
,
'WriteDiagdS'
,
'WriteEDM'
,
'WriteEigenvalues'
,
'WriteForces'
,
'WriteHSDeriv'
,
'WriteHamiltonPop'
,
'WriteHirshfeldPop'
,
'WriteIonPlotFiles'
,
'WriteKbands'
,
'WriteKpoints'
,
'WriteMDXmol'
,
'WriteMDhistory'
,
'WriteMullikenPop'
,
'WriteProjections'
,
'WriteSpinMulliken'
,
'WriteSpinSCF'
,
'WriteVNA'
,
'WriteVoronoiPop'
,
'WriteWaveFunctions'
,
'XML.AbortOnErrors'
,
'XML.AbortOnWarnings'
,
'XML.Write'
,
'ZBroadeningG'
,
'ZLeftVcte'
,
'ZM.CalcAllForces'
,
'ZM.ForceTolAngle'
,
'ZM.ForceTolLength'
,
'ZM.MaxDisplAngle'
,
'ZM.MaxDisplLength'
,
'ZM.UnitsAngle'
,
'ZM.UnitsLength'
,
'ZRightVcte'
,
'ZVGateL'
,
'ZVGateR'
,
'ZeemanTermBx'
,
'ZeemanTermBy'
,
'ZeemanTermBz'
,
'alloc_report_level'
,
'alloc_report_threshold'
,
'blocksize'
,
'compat-pre-v4-dynamics'
,
'fdf-debug'
,
'kgrid_cutoff'
,
'processorY'
,
'timer_report_threshold'
,
'user-basis'
,
'user-basis-netcdf'
,
'xc.authors'
,
'xc.functional'
,
]
parser/parser-siesta/main.py
deleted
100644 → 0
View file @
63c52686
# Copyright 2016-2018 Ask Hjorth Larsen, Fawzi Mohamed
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Main author and maintainer: Ask Hjorth Larsen <asklarsen@gmail.com>
from
__future__
import
print_function
import
os
import
sys
import
setup_paths
from
glob
import
glob
import
re
import
numpy
as
np
from
ase.data
import
chemical_symbols
from
ase
import
Atoms
from
nomadcore.simple_parser
import
(
mainFunction
,
SimpleMatcher
as
SM
,
AncillaryParser
)
from
nomadcore.local_meta_info
import
loadJsonFile
,
InfoKindEl
from
nomadcore.unit_conversion.unit_conversion
\
import
register_userdefined_quantity
,
convert_unit
from
inputvars
import
varlist
metaInfoPath
=
os
.
path
.
normpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"../../../../nomad-meta-info/meta_info/nomad_meta_info/siesta.nomadmetainfo.json"
))
metaInfoEnv
,
warnings
=
loadJsonFile
(
filePath
=
metaInfoPath
,
dependencyLoader
=
None
,
extraArgsHandling
=
InfoKindEl
.
ADD_EXTRA_ARGS
,
uri
=
None
)
parser_info
=
{
'name'
:
'siesta-parser'
,
'version'
:
'1.0'
}
def
siesta_energy
(
title
,
meta
,
**
kwargs
):
return
SM
(
r
'siesta:\s*%s\s*=\s*(?P<%s__eV>\S+)'
%
(
title
,
meta
),
name
=
meta
,
**
kwargs
)
def
line_iter
(
fd
,
linepattern
=
re
.
compile
(
r
'\s*([^#]+)'
)):
# Strip off comments and whitespace, return only non-empty strings
for
line
in
fd
:
match
=
linepattern
.
match
(
line
)
if
match
:
line
=
match
.
group
().
rstrip
()
if
line
:
yield
line
def
get_input_metadata
(
inputvars_file
,
use_new_format
):
inputvars
=
{}
blocks
=
{}
varset
=
set
(
varlist
)
lower_vars
=
{}
for
var
in
varlist
:
lower_vars
[
var
.
lower
()]
=
var
def
addvar
(
tokens
):
name
=
tokens
[
0
]
val
=
' '
.
join
(
tokens
[
1
:])
name
=
name
.
lower
()
if
name
in
lower_vars
:
name
=
lower_vars
[
name
]
inputvars
[
name
]
=
val
currentblock
=
None
with
open
(
inputvars_file
)
as
fd
:
lines
=
line_iter
(
fd
)
for
line
in
lines
:
tokens
=
line
.
split
()
assert
len
(
tokens
)
>
0
if
tokens
[
0
].
startswith
(
'%'
):
if
tokens
[
0
].
lower
()
==
'%block'
:
#assert currentblock == None
currentblock
=
[]
blocks
[
tokens
[
1
]]
=
currentblock
elif
tokens
[
0
].
lower
()
==
'%endblock'
:
currentblock
=
None
else
:
raise
ValueError
(
'Unknown: %s'
%
tokens
[
0
])
else
:
if
use_new_format
:
if
line
.
startswith
(
' '
):
if
currentblock
is
None
:
continue
# Ignore. Probably some warning
#assert currentblock is not None, line
currentblock
.
append
(
tokens
)
else
:
currentblock
=
None
addvar
(
tokens
)
else
:
if
currentblock
is
not
None
:
currentblock
.
append
(
tokens
)
else
:
addvar
(
tokens
)
return
inputvars
,
blocks
"""
%block PAO.Basis # Define Basis set
O 2 # Species label, number of l-shells
n=2 0 2 # n, l, Nzeta
3.305 2.479
1.000 1.000
n=2 1 2 P 1 # n, l, Nzeta, Polarization, NzetaPol
3.937 2.542
1.000 1.000
H 1 # Species label, number of l-shells
n=1 0 2 P 1 # n, l, Nzeta, Polarization, NzetaPol
4.709 3.760
1.000 1.000
%endblock PAO.Basis
"""
class
SiestaContext
(
object
):
def
__init__
(
self
):
self
.
fname
=
None
# The file that we are parsing
self
.
dirname
=
None
# Base directory of calculations
#self.parser = None # The parser object
self
.
format
=
None
# 'old' or 'new'; when parsing version
# label and things determined by label
self
.
label
=
None
self
.
files
=
None
# Dict of files
self
.
blocks
=
None
# Dict of input blocks (coords, cell, etc.)
self
.
data
=
{}
self
.
special_input_vars
=
{}
self
.
system_meta
=
{}
self
.
section_refs
=
{}
# {name: gindex, ...}
self
.
simulation_type
=
None
def
adhoc_format_new
(
self
,
parser
):
assert
self
.
format
is
None
self
.
format
=
'new'
def
adhoc_format_old
(
self
,
parser
):
assert
self
.
format
is
None
self
.
format
=
'old'
def
adhoc_set_label
(
self
,
parser
):
# ASSUMPTION: the parser fIn is in the 'root' of whatever was uploaded.
# This may not be true. Figure out how to do this in general.
line
=
parser
.
fIn
.
readline
()
assert
line
.
startswith
(
'reinit: System Label:'
)
self
.
label
=
label
=
line
.
split
()[
-
1
]
dirname
=
self
.
dirname
files
=
{}
for
fileid
in
[
'EIG'
,
'KP'
]:
path
=
os
.
path
.
join
(
dirname
,
'%s.%s'
%
(
label
,
fileid
))
if
os
.
path
.
isfile
(
path
):
files
[
fileid
]
=
path
# Warn if files are not present?
#
# Also: input file
# input parser logfile
#
# what else? We already get force/stress/positions from stdout.
if
self
.
format
==
'new'
:
inplogfiles
=
glob
(
'%s/fdf-*.log'
%
dirname
)
assert
len
(
inplogfiles
)
==
1
if
inplogfiles
:
inplogfiles
.
sort
()
files
[
'inputlog'
]
=
inplogfiles
[
0
]
else
:
assert
self
.
format
==
'old'
,
self
.
format
files
[
'inputlog'
]
=
os
.
path
.
join
(
dirname
,
'out.fdf'
)
self
.
files
=
files
def
adhoc_set_simulation_type
(
self
,
parser
):
line
=
parser
.
fIn
.
readline
()
if
self
.
simulation_type
is
not
None
:
return
line
=
line
.
strip
()
if
line
.
startswith
(
'Single-point'
):
self
.
simulation_type
=
'singlepoint'
elif
'opt'
in
line
or
'move'
in
line
:
self
.
simulation_type
=
'optimization'
else
:
raise
ValueError
(
'Todo: recognize simulation type "%s"'
%
line
)
def
startedParsing
(
self
,
fname
,
parser
):
self
.
fname
=
fname
path
=
os
.
path
.
abspath
(
fname
)
self
.
dirname
,
_
=
os
.
path
.
split
(
path
)
#self.parser = parser
#def onClose_x_siesta_section_xc_authors(self, backend, gindex, section):
def
onClose_section_frame_sequence
(
self
,
backend
,
gindex
,
section
):
backend
.
addValue
(
'frame_sequence_to_sampling_ref'
,
self
.
section_refs
[
'sampling_method'
])
def
onOpen_section_sampling_method
(
self
,
backend
,
gindex
,
section
):
self
.
section_refs
[
'sampling_method'
]
=
gindex
def
onOpen_section_frame_sequence
(
self
,
backend
,
gindex
,
section
):
self
.
section_refs
[
'frame_sequence'
]
=
gindex
def
onClose_section_sampling_method
(
self
,
backend
,
gindex
,
section
):
simtype
=
self
.
simulation_type
assert
simtype
is
not
None
if
simtype
==
'optimization'
:
backend
.
addValue
(
'sampling_method'
,
'geometry_optimization'
)
elif
simtype
==
'singlepoint'
:
pass
else
:
raise
ValueError
(
'XXX: %s'
%
simtype
)
def
onClose_section_eigenvalues
(
self
,
backend
,
gindex
,
section
):
self
.
read_eigenvalues
(
backend
)
def
onOpen_section_method
(
self
,
backend
,
gindex
,
section
):
self
.
section_refs
[
'method'
]
=
gindex
def
onClose_section_method
(
self
,
backend
,
gindex
,
section
):
temp
=
self
.
special_input_vars
[
'ElectronicTemperature'
]
temp
,
unit
=
temp
.
split
()
assert
unit
==
'Ry'
# Siesta always converts to Ry here I think
temp
=
float
(
temp
)
temp
=
convert_unit
(
temp
,
'rydberg'
)
backend
.
addValue
(
'smearing_width'
,
temp
)
#simtype = self.special_input_vars['MD.TypeOfRun']
#print('SIMTYPE', simtype)
#sdfsdf
def
onOpen_section_system
(
self
,
backend
,
gindex
,
section
):
self
.
section_refs
[
'system'
]
=
gindex