Commit ee3c0e0e authored by Ask Hjorth Larsen's avatar Ask Hjorth Larsen
Browse files

more comprehensive input vars. Better handling of case sensitivity

parent 6ce39d56
varlist = [ varlist = [
'%endblock',
'Atom-Setup-Only', 'Atom-Setup-Only',
'Atom.Debug.KB.Generation', 'Atom.Debug.KB.Generation',
'AtomCoorFormatOut', 'AtomCoorFormatOut',
'AtomLeftVcte',
'AtomRightVcte',
'AtomicCoordinatesFormat', 'AtomicCoordinatesFormat',
'BasisPressure', 'BasisPressure',
'BornCharge', 'BornCharge',
'BuildSuperCell',
'BulkLead',
'BulkTransport',
'BulkTransvCellSize',
'BulkTransvCellSizeX',
'BulkTransvCellSizeY',
'BulkTransvCellSizeZ',
'CB.MaxKappa',
'CB.WriteComplexBands',
'CDFT',
'CDFT.MaxIter',
'COOP.Write', 'COOP.Write',
'CalcIETS',
'CalcMPSH',
'ChangeKgridInMD', 'ChangeKgridInMD',
'Compat-pre-v4-DM-H', 'Compat-pre-v4-DM-H',
'DM.AllowExtrapolation', 'DM.AllowExtrapolation',
...@@ -31,6 +47,8 @@ varlist = [ ...@@ -31,6 +47,8 @@ varlist = [
'DM.RequireHarrisConvergence', 'DM.RequireHarrisConvergence',
'DM.Tolerance', 'DM.Tolerance',
'DM.UseSaveDM', 'DM.UseSaveDM',
'Delta',
'DeltaWorkfunction',
'Diag.AllInOne', 'Diag.AllInOne',
'Diag.DivideAndConquer', 'Diag.DivideAndConquer',
'Diag.Memory', 'Diag.Memory',
...@@ -38,22 +56,63 @@ varlist = [ ...@@ -38,22 +56,63 @@ varlist = [
'Diag.ParallelOverK', 'Diag.ParallelOverK',
'Diag.PreRotate', 'Diag.PreRotate',
'Diag.Use2D', 'Diag.Use2D',
'DiagMemory',
'DiagScale',
'DirectPhi', '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', 'ElectronicTemperature',
'EnergLowestBound',
'FilterCutoff', 'FilterCutoff',
'FilterTol', 'FilterTol',
'FinalTransmRange',
'FixAuxiliaryCell', 'FixAuxiliaryCell',
'FixAuxillaryCell',
'FixSpin', 'FixSpin',
'ForceAuxCell', 'ForceAuxCell',
'FullRamp',
'HSetupOnly', 'HSetupOnly',
'Harris_functional', 'Harris_functional',
'HartreeLeadsBottom',
'HartreeLeadsLeft',
'HartreeLeadsRight',
'Ik_Select',
'InitTransmRange',
'InitTransport',
'KB.New.Reference.Orbitals', 'KB.New.Reference.Orbitals',
'KB.Rmax', 'KB.Rmax',
'LDAU.units',
'LDAUForces',
'LDAU_METHOD',
'LatticeConstant', 'LatticeConstant',
'LongOutput', 'LongOutput',
'MD.AnnealOption', 'MD.AnnealOption',
'MD.BulkModulus', 'MD.BulkModulus',
'MD.FCAcousticSumRule',
'MD.FCAtomRestart',
'MD.FCAxisRestart',
'MD.FCDispl', 'MD.FCDispl',
'MD.FCEigenVectors',
'MD.FCIR',
'MD.FCRead',
'MD.FCfirst', 'MD.FCfirst',
'MD.FClast', 'MD.FClast',
'MD.FinalTimeStep', 'MD.FinalTimeStep',
...@@ -66,15 +125,20 @@ varlist = [ ...@@ -66,15 +125,20 @@ varlist = [
'MD.MaxStressTol', 'MD.MaxStressTol',
'MD.NoseMass', 'MD.NoseMass',
'MD.NumCGsteps', 'MD.NumCGsteps',
'MD.NumNEBsteps',
'MD.ParrinelloRahmanMass', 'MD.ParrinelloRahmanMass',
'MD.Quench', 'MD.Quench',
'MD.RelaxCellOnly', 'MD.RelaxCellOnly',
'MD.RemoveIntraMolecularPressure', 'MD.RemoveIntraMolecularPressure',
'MD.TRCSampling',
'MD.TRCSkip',
'MD.TargetPressure', 'MD.TargetPressure',
'MD.TargetTemperature', 'MD.TargetTemperature',
'MD.TauRelax', 'MD.TauRelax',
'MD.Timing',
'MD.TypeOfRun', 'MD.TypeOfRun',
'MD.UseSaveCG', 'MD.UseSaveCG',
'MD.UseSaveNEB',
'MD.UseSaveXV', 'MD.UseSaveXV',
'MD.UseSaveZM', 'MD.UseSaveZM',
'MD.UseStructFile', 'MD.UseStructFile',
...@@ -82,6 +146,10 @@ varlist = [ ...@@ -82,6 +146,10 @@ varlist = [
'MM.Cutoff', 'MM.Cutoff',
'MM.UnitsDistance', 'MM.UnitsDistance',
'MM.UnitsEnergy', 'MM.UnitsEnergy',
'MPSHAtomFirst',
'MPSHAtomLast',
'MPSHOrbFirst',
'MPSHOrbLast',
'MaxBondDistance', 'MaxBondDistance',
'MaxSCFIterations', 'MaxSCFIterations',
'MeshCutoff', 'MeshCutoff',
...@@ -89,14 +157,28 @@ varlist = [ ...@@ -89,14 +157,28 @@ varlist = [
'MinSCFIterations', 'MinSCFIterations',
'MixCharge', 'MixCharge',
'MixHamiltonian', 'MixHamiltonian',
'MixedParallel',
'MonitorForcesInSCF', 'MonitorForcesInSCF',
'MullikenInSCF', 'MullikenInSCF',
'NC.OrbitalRotationEnd',
'NC.OrbitalRotationStart',
'NEB.SkipEdge',
'NEnergReal',
'NIVPoints',
'NPoles',
'NSlices',
'NTransmPoints',
'NaiveAuxiliaryCell', 'NaiveAuxiliaryCell',
'NeglNonOverlapInt', 'NeglNonOverlapInt',
'NenergImCircle',
'NenergImLine',
'NetCharge', 'NetCharge',
'NonCollinearSpin', 'NonCollinearSpin',
'NumSkipWriteDM',
'NumberLinearMix',
'NumberOfAtoms', 'NumberOfAtoms',
'NumberOfEigenStates', 'NumberOfEigenStates',
'NumberOfSpecies',
'Number_of_species', 'Number_of_species',
'ON.ChemicalPotential', 'ON.ChemicalPotential',
'ON.ChemicalPotentialOrder', 'ON.ChemicalPotentialOrder',
...@@ -129,16 +211,26 @@ varlist = [ ...@@ -129,16 +211,26 @@ varlist = [
'PAO.SplitNorm', 'PAO.SplitNorm',
'PAO.SplitNormH', 'PAO.SplitNormH',
'PAO.SplitTailNorm', 'PAO.SplitTailNorm',
'PS.SIC',
'ParallelOverK',
'PartialChargesAtEveryGeometry', 'PartialChargesAtEveryGeometry',
'PartialChargesAtEveryScfStep', 'PartialChargesAtEveryScfStep',
'PoissonMultigrid',
'Print_ldau',
'ProcessorGridX', 'ProcessorGridX',
'ProcessorGridY', 'ProcessorGridY',
'ProcessorGridZ', 'ProcessorGridZ',
'ProjectionInSCF',
'ProjectionMethod',
'RcSpatial', 'RcSpatial',
'ReInitialiseDM', 'ReInitialiseDM',
'ReadHamiltonian',
'ReadKPIN',
'ReparametrizePseudos', 'ReparametrizePseudos',
'Restricted.Radial.Grid', 'Restricted.Radial.Grid',
'Rmax.Radial.Grid', 'Rmax.Radial.Grid',
'RotateSpin.Phi',
'RotateSpin.Theta',
'SCF.LinearMixingAfterPulay', 'SCF.LinearMixingAfterPulay',
'SCF.MixAfterConvergence', 'SCF.MixAfterConvergence',
'SCF.MixingWeightAfterPulay', 'SCF.MixingWeightAfterPulay',
...@@ -153,6 +245,18 @@ varlist = [ ...@@ -153,6 +245,18 @@ varlist = [
'SCF.Recompute-H-After-Scf', 'SCF.Recompute-H-After-Scf',
'SCF.Want.Variational.EKS', 'SCF.Want.Variational.EKS',
'SCFMustConverge', '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', 'SaveBaderCharge',
'SaveDeltaRho', 'SaveDeltaRho',
'SaveElectrostaticPotential', 'SaveElectrostaticPotential',
...@@ -164,6 +268,8 @@ varlist = [ ...@@ -164,6 +268,8 @@ varlist = [
'SaveRhoXC', 'SaveRhoXC',
'SaveTotalCharge', 'SaveTotalCharge',
'SaveTotalPotential', 'SaveTotalPotential',
'Scissor.Operator',
'SetBulkTransvCell',
'Siesta2Wannier90.NumberOfBands', 'Siesta2Wannier90.NumberOfBands',
'Siesta2Wannier90.NumberOfBandsDown', 'Siesta2Wannier90.NumberOfBandsDown',
'Siesta2Wannier90.NumberOfBandsUp', 'Siesta2Wannier90.NumberOfBandsUp',
...@@ -171,20 +277,32 @@ varlist = [ ...@@ -171,20 +277,32 @@ varlist = [
'Siesta2Wannier90.WriteEig', 'Siesta2Wannier90.WriteEig',
'Siesta2Wannier90.WriteMmn', 'Siesta2Wannier90.WriteMmn',
'Siesta2Wannier90.WriteUnk', 'Siesta2Wannier90.WriteUnk',
'Sigma.DSigmaDE',
'SignatureRecords',
'SimulateDoping', 'SimulateDoping',
'SingleExcitation', 'SingleExcitation',
'SkipLastIter',
'SlabDipoleCorrection',
'SolutionMethod', 'SolutionMethod',
'SpinConfLeads',
'SpinOrbit',
'SpinPolarized', 'SpinPolarized',
'SystemLabel', 'SystemLabel',
'SystemName', 'SystemName',
'TS.MixH', 'TS.MixH',
'TimeReversal',
'TimeReversalSymmetryForKpoints', 'TimeReversalSymmetryForKpoints',
'TrCoefficients',
'TryMemoryIncrease',
'UseDomainDecomposition', 'UseDomainDecomposition',
'UseNewDiagk', 'UseNewDiagk',
'UseSaveData', 'UseSaveData',
'UseSpatialDecomposition', 'UseSpatialDecomposition',
'UseStructFile', 'UseStructFile',
'UseTreeTimer', 'UseTreeTimer',
'VFinal',
'VGate',
'VInitial',
'Vna.Filter', 'Vna.Filter',
'WarningMinimumAtomicDistance', 'WarningMinimumAtomicDistance',
'WriteBands', 'WriteBands',
...@@ -197,9 +315,14 @@ varlist = [ ...@@ -197,9 +315,14 @@ varlist = [
'WriteDM.NetCDF', 'WriteDM.NetCDF',
'WriteDMHS.History.NetCDF', 'WriteDMHS.History.NetCDF',
'WriteDMHS.NetCDF', 'WriteDMHS.NetCDF',
'WriteDMT',
'WriteDenchar', 'WriteDenchar',
'WriteDiagdS',
'WriteEDM',
'WriteEigenvalues', 'WriteEigenvalues',
'WriteForces', 'WriteForces',
'WriteHSDeriv',
'WriteHamiltonPop',
'WriteHirshfeldPop', 'WriteHirshfeldPop',
'WriteIonPlotFiles', 'WriteIonPlotFiles',
'WriteKbands', 'WriteKbands',
...@@ -207,11 +330,17 @@ varlist = [ ...@@ -207,11 +330,17 @@ varlist = [
'WriteMDXmol', 'WriteMDXmol',
'WriteMDhistory', 'WriteMDhistory',
'WriteMullikenPop', 'WriteMullikenPop',
'WriteProjections',
'WriteSpinMulliken',
'WriteSpinSCF',
'WriteVNA',
'WriteVoronoiPop', 'WriteVoronoiPop',
'WriteWaveFunctions', 'WriteWaveFunctions',
'XML.AbortOnErrors', 'XML.AbortOnErrors',
'XML.AbortOnWarnings', 'XML.AbortOnWarnings',
'XML.Write', 'XML.Write',
'ZBroadeningG',
'ZLeftVcte',
'ZM.CalcAllForces', 'ZM.CalcAllForces',
'ZM.ForceTolAngle', 'ZM.ForceTolAngle',
'ZM.ForceTolLength', 'ZM.ForceTolLength',
...@@ -219,10 +348,19 @@ varlist = [ ...@@ -219,10 +348,19 @@ varlist = [
'ZM.MaxDisplLength', 'ZM.MaxDisplLength',
'ZM.UnitsAngle', 'ZM.UnitsAngle',
'ZM.UnitsLength', 'ZM.UnitsLength',
'ZRightVcte',
'ZVGateL',
'ZVGateR',
'ZeemanTermBx',
'ZeemanTermBy',
'ZeemanTermBz',
'alloc_report_level', 'alloc_report_level',
'alloc_report_threshold', 'alloc_report_threshold',
'blocksize',
'compat-pre-v4-dynamics', 'compat-pre-v4-dynamics',
'fdf-debug',
'kgrid_cutoff', 'kgrid_cutoff',
'processorY',
'timer_report_threshold', 'timer_report_threshold',
'user-basis', 'user-basis',
'user-basis-netcdf', 'user-basis-netcdf',
......
...@@ -26,6 +26,13 @@ json_section_template = """{ ...@@ -26,6 +26,13 @@ json_section_template = """{
"description": "%(description)s", "description": "%(description)s",
"kindStr": "type_abstract_document_content", "kindStr": "type_abstract_document_content",
"name": "%(name)s", "name": "%(name)s",
"superNames": [
"x_siesta_section_input"
]
}, {
"description": "input section",
"kindStr": "type_section",
"name": "x_siesta_section_input",
"superNames": [ "superNames": [
"section_run" "section_run"
] ]
...@@ -33,20 +40,47 @@ json_section_template = """{ ...@@ -33,20 +40,47 @@ json_section_template = """{
# END OF TEMPLATES FROM OCTOPUS # END OF TEMPLATES FROM OCTOPUS
import sys import sys
fname = sys.argv[1] #fname = sys.argv[1]
inputvars_fd = open('inputvars.py', 'w') inputvars_fd = open('inputvars.py', 'w')
print('inputvars = [', file=inputvars_fd) print('varlist = [', file=inputvars_fd)
with open(fname) as fd: def getlines():
varnames = [] fd = open('test/H2O/fdf-95611.log')
for line in fd: for line in fd:
if not line[:1].isalpha(): # Get rid of blocks if not line[:1].isalpha(): # Get rid of blocks
continue continue
yield line
withinblock = False
fd = open('test/smeagol-Au-leads/out.fdf')
for line in fd:
if line.startswith('%block'):
withinblock = True
elif line.startswith('%endblock'):
withinblock = False
if withinblock:
continue
yield line
seen = set()
#with open(fname) as fd:
#for line in getlines():
if 1:
varnames = []
for line in getlines():
# Get rid of comments # Get rid of comments
line = line.strip().rsplit('#', 1)[0] line = line.strip().rsplit('#', 1)[0].strip()
if not line:
continue
varname = line.split()[0] varname = line.split()[0]
lowervarname = varname.lower()
if lowervarname in seen:
continue # Already registered
seen.add(lowervarname)
varnames.append(varname) varnames.append(varname)
varnames = list(set(varnames)) varnames = list(set(varnames))
varnames.sort() varnames.sort()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment