Skip to main content

Calculate bound states and resonances for potential

Project description

resoncalc

Calculate bound states and resonances for potential.

User manual

Installation

pip install git+https://github.com/hydratk/resoncalc.git

Requirements

matplotlib>=3.7.2
numpy>=1.25.1
scipy>=1.11.1
sympy>=1.12

Command line interface

usage: 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 generate

Typical usage for states calculation and graphs generation

resoncalc input/settings.json -o output
resoncalc input/data.csv -o output -g -t test

Sample tests

See folder samples/settings for 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"]
} 

Parameters

  • title: output directory name, by default according to potential
  • potential: potential from list
  • nquad: order of quadrature polynomials
  • x0: center for ECS method, default 0
  • phases: 2 phases for ECS method, default 40, 30
  • prec: states detection precision, default 1e-8
  • emax: maximum detected energy in atomic units
  • mu: reduced mass in atomic units
  • l: secondary quantum number
  • params: potential parameters definition in interval [start,end] and given count, alternatively list of values
  • params2: other potential parameters not changed during calculation
  • intervals: element definition for FEM-DVR method in interval [start,end] and given count of elements and division
  • outstates: types of generated states, default all
  • outfiles: types of generated output files, default all

Potentials

See file potential.py for definition.

  • gaussian
  • exponential
  • morse
  • parabolic_gaussian
  • parabolic_gaussian2

You can also add your potential, just create new function and add it to mapping. Sample settings files for all potential are available in folder samples/settings.

Output

Sample output for states calculation is available in folder samples/output.

  • states.csv: detected bound states and resonances
  • spectrum_par1_par2_l.png: complex spectrum with highlighted bound states and resonances and eigenvalues for given parameters and both ECS phases
  • potential_par1_par2_l.png: potential with highlighted bound states and resonances for given parameters
  • eigenvalues_par1_par_l.phase.csv: eigenvalues for given parameters and phase
  • potential_grid_par1_par2_l_phase.csv: potential values on grid for given parameters and phase
  • gaussian.json: copy of input settings
  • log.log: application log, more detailed in verbose mode

Sample output for graphs generation is available in folde samples/generate.

  • gaussian.csv input file with resonances for gaussian potential
  • resonances_complex_gaussian.png: complex spectrum
  • resonances_energy_gaussian.png: resonance energy
  • resonances_width_gaussian.png: resonance width

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resoncalc-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

File details

Details for the file resoncalc-0.1.0.tar.gz.

File metadata

  • Download URL: resoncalc-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for resoncalc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 399911c1bced296e2a3f9b732cdeed6f7875a39803986ef92b96fec262e7b05c
MD5 24914a4ff23ce92021491b9d9e378e1c
BLAKE2b-256 bb212701cedcdf3a297741d2caf5dab2582fa3fd48689f490ffd9d641b7b3aa7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page