Package: resoncalc
resoncalcCalculate bound states and resonances for potential.User manualInstallationpip install git+https://github.com/hydratk/resoncalc.gitRequirementsmatplotlib>=3.7.2
numpy>=1.25.1
scipy>=1.11.1
sympy>=1.12Command line interfaceusage: resoncalc [-h] [-o OUTPUT] [-v] [-s] [-g] 
                 [-t TITLE] input

Calculate bound states and resonances for potential

positional arguments:
  input                 input file with computation settings

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output directory
  -v, --verbose         verbose mode
  -s, --silent          silent mode
  -g, --generate        generate graphs from data
  -t TITLE, --title TITLE
                        output title, used for generateTypical usage for states calculation and graphs generationresoncalc input/settings.json -o output
resoncalc input/data.csv -o output -g -t testSample testsSee foldersamples/settingsfor more samples.With mandatory parameters{
  "potential" : "gaussian",
  "params" : [
    {"start": -0.62, "end": -0.56, "cnt": 13},
    {"start": 0.1,   "end": 0.2,   "cnt": 5}
  ],
  "intervals" : [
    {"start": 0.0,   "end": 9.0,   "elems": 15, 
     "type": "equidistant"},
    {"start": 9.0,   "end": 100.0, "elems": 15, 
     "type": "progressive", "len": 0.6},
    {"start": 100.0, "end": 10000.0, "elems": 15, 
     "type": "progressive", "len": 6.0}
  ]
}With optional parameters{
  "title" : "run1",
  "potential" : "parabolic_gaussian",
  "nquad" : 15,
  "x0" : 0.0,
  "phases" : [40.0, 30.0],
  "prec" : 1e-8,
  "emax" : 1.0,
  "mu" : 1.0,
  "l" : 1,
  "params" : [
    {"list": [0.028]},
    {"start": 0.028, "end": 0.029, "cnt": 10}
  ],
  "params2" : [1.0],
  "intervals" : [
    {"start": 0.0,   "end": 10.0,  "elems": 20, 
     "type": "equidistant"},
    {"start": 10.0,  "end": 150.0, "elems": 15, 
     "type": "progressive", "len": 0.5}
   ],
  "outstates" : ["bound", "resonance"],
  "outfiles" : ["states", "eigenvalues", "potential_grid", 
                "spectrum", "log", "settings"]
}Parameterstitle: output directory name, by default according to potentialpotential: potential from listnquad: order of quadrature polynomialsx0: center for ECS method, default 0phases: 2 phases for ECS method, default 40, 30prec: states detection precision, default 1e-8emax: maximum detected energy in atomic unitsmu: reduced mass in atomic unitsl: secondary quantum numberparams: potential parameters definition in interval [start,end] and given count, alternatively list of valuesparams2: other potential parameters not changed during calculationintervals: element definition for FEM-DVR method in interval [start,end] and given count of elements and divisionoutstates: types of generated states, default alloutfiles: types of generated output files, default allPotentialsSee filepotential.pyfor definition.gaussianexponentialmorseparabolic_gaussianparabolic_gaussian2You can also add your potential, just create new function and add it to mapping.
Sample settings files for all potential are available in foldersamples/settings.OutputSample output for states calculation is available in foldersamples/output.states.csv: detected bound states and resonancesspectrum_par1_par2_l.png: complex spectrum with highlighted bound states and resonances and eigenvalues for given parameters and both ECS phasespotential_par1_par2_l.png: potential with highlighted bound states and resonances for given parameterseigenvalues_par1_par_l.phase.csv: eigenvalues for given parameters and phasepotential_grid_par1_par2_l_phase.csv: potential values on grid for given parameters and phasegaussian.json: copy of input settingslog.log: application log, more detailed in verbose modeSample output for graphs generation is available in foldesamples/generate.gaussian.csvinput file with resonances for gaussian potentialresonances_complex_gaussian.png: complex spectrumresonances_energy_gaussian.png: resonance energyresonances_width_gaussian.png: resonance width