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 = [
'%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',
......@@ -31,6 +47,8 @@ varlist = [
'DM.RequireHarrisConvergence',
'DM.Tolerance',
'DM.UseSaveDM',
'Delta',
'DeltaWorkfunction',
'Diag.AllInOne',
'Diag.DivideAndConquer',
'Diag.Memory',
......@@ -38,22 +56,63 @@ varlist = [
'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',
......@@ -66,15 +125,20 @@ varlist = [
'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',
......@@ -82,6 +146,10 @@ varlist = [
'MM.Cutoff',
'MM.UnitsDistance',
'MM.UnitsEnergy',
'MPSHAtomFirst',
'MPSHAtomLast',
'MPSHOrbFirst',
'MPSHOrbLast',
'MaxBondDistance',
'MaxSCFIterations',
'MeshCutoff',
......@@ -89,14 +157,28 @@ varlist = [
'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',
......@@ -129,16 +211,26 @@ varlist = [
'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',
......@@ -153,6 +245,18 @@ varlist = [
'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',
......@@ -164,6 +268,8 @@ varlist = [
'SaveRhoXC',
'SaveTotalCharge',
'SaveTotalPotential',
'Scissor.Operator',
'SetBulkTransvCell',
'Siesta2Wannier90.NumberOfBands',
'Siesta2Wannier90.NumberOfBandsDown',
'Siesta2Wannier90.NumberOfBandsUp',
......@@ -171,20 +277,32 @@ varlist = [
'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',
......@@ -197,9 +315,14 @@ varlist = [
'WriteDM.NetCDF',
'WriteDMHS.History.NetCDF',
'WriteDMHS.NetCDF',
'WriteDMT',
'WriteDenchar',
'WriteDiagdS',
'WriteEDM',
'WriteEigenvalues',
'WriteForces',
'WriteHSDeriv',
'WriteHamiltonPop',
'WriteHirshfeldPop',
'WriteIonPlotFiles',
'WriteKbands',
......@@ -207,11 +330,17 @@ varlist = [
'WriteMDXmol',
'WriteMDhistory',
'WriteMullikenPop',
'WriteProjections',
'WriteSpinMulliken',
'WriteSpinSCF',
'WriteVNA',
'WriteVoronoiPop',
'WriteWaveFunctions',
'XML.AbortOnErrors',
'XML.AbortOnWarnings',
'XML.Write',
'ZBroadeningG',
'ZLeftVcte',
'ZM.CalcAllForces',
'ZM.ForceTolAngle',
'ZM.ForceTolLength',
......@@ -219,10 +348,19 @@ varlist = [
'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',
......
......@@ -26,6 +26,13 @@ json_section_template = """{
"description": "%(description)s",
"kindStr": "type_abstract_document_content",
"name": "%(name)s",
"superNames": [
"x_siesta_section_input"
]
}, {
"description": "input section",
"kindStr": "type_section",
"name": "x_siesta_section_input",
"superNames": [
"section_run"
]
......@@ -33,20 +40,47 @@ json_section_template = """{
# END OF TEMPLATES FROM OCTOPUS
import sys
fname = sys.argv[1]
#fname = sys.argv[1]
inputvars_fd = open('inputvars.py', 'w')
print('inputvars = [', file=inputvars_fd)
print('varlist = [', file=inputvars_fd)
with open(fname) as fd:
varnames = []
def getlines():
fd = open('test/H2O/fdf-95611.log')
for line in fd:
if not line[:1].isalpha(): # Get rid of blocks
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
line = line.strip().rsplit('#', 1)[0]
line = line.strip().rsplit('#', 1)[0].strip()
if not line:
continue
varname = line.split()[0]
lowervarname = varname.lower()
if lowervarname in seen:
continue # Already registered
seen.add(lowervarname)
varnames.append(varname)
varnames = list(set(varnames))
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