{"id":20250597,"url":"https://github.com/sheepforce/exckel","last_synced_at":"2025-03-03T16:24:14.580Z","repository":{"id":45154848,"uuid":"166222143","full_name":"sheepforce/Exckel","owner":"sheepforce","description":"creating summaries from excited state calculations from different QC software","archived":false,"fork":false,"pushed_at":"2019-10-24T21:40:39.000Z","size":360,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T02:43:48.523Z","etag":null,"topics":["chemistry","haskell-application","quantum-chemistry","tddft","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheepforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-17T12:28:31.000Z","updated_at":"2022-07-13T03:45:21.000Z","dependencies_parsed_at":"2022-07-13T18:19:52.478Z","dependency_job_id":null,"html_url":"https://github.com/sheepforce/Exckel","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepforce%2FExckel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepforce%2FExckel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepforce%2FExckel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepforce%2FExckel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheepforce","download_url":"https://codeload.github.com/sheepforce/Exckel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241697177,"owners_count":20004967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chemistry","haskell-application","quantum-chemistry","tddft","wrapper"],"created_at":"2024-11-14T09:59:13.799Z","updated_at":"2025-03-03T16:24:14.557Z","avatar_url":"https://github.com/sheepforce.png","language":"Haskell","readme":"# Exckel\nExckel generates documents to summarise and visualise the results of excited state calculations in quantum chemistry. It automates the following task\n\n  - parse the output file of the quantum chemistry software\n  - select/filter excited states by their $\u003cS^2\u003e$ and/or their minimum oscillator strength\n  - plot the spectrum (with conversion to absorption coefficient and wavelength)\n  - calculate orbital and charge difference density cubes\n  - render images of the cubes\n  - write a summary document, which tabulates excitations and images of orbitals involved and the CDDs of the excited states\n\nExckel is completely written in Haskell, but basically it glues together existing solutions for the individual tasks.\n\n- *Quantum chemistry software supported:*\n  - [Gaussian](gaussian.com) TDDFT/CIS (requires `#p`)\n  - [NWChem](http://www.nwchem-sw.org/index.php/Main_Page) TDDFT/RPA\n  - [MRCC](https://www.mrcc.hu/) ADC(2)\n  - [ORCA](https://orcaforum.kofo.mpg.de/index.php) TDDFT\n- *Cube calculator:*\n  - [Multiwfn](http://sobereva.com/multiwfn/) (tested with 3.5, gMultiwfn 3.4.1)\n  - [REPA] (http://hackage.haskell.org/package/repa) (only CDDs from existing orbital cubes)\n- *Cube renderer:*\n  - [VMD](https://www.ks.uiuc.edu/Research/vmd/) (tested with 1.9.3) \u0026 [Tachyon](http://jedi.ks.uiuc.edu/~johns/raytracer/)\n\n\n## Usage\nExckel is a command line program and can be easily called from a bash script or simply directly from the command line. The minimum input you will need is the output file from your quantum chemistry code and a wavefunction file (molden or fchk).\n\nBy calling `exckel exckel --help`, a quick explanation of all possible keywords is provided.\n\n    The exckelargs program\n\n    exckelargs exckel [OPTIONS]\n\n    Flags:\n       --nocalcorbs                Do not calculate cubes for orbitals.\n       --nocalccdds                Do not calculate charge density difference\n                                   cubes.\n       --norenderimages            Do not render images from cubes.\n    -o --outdir=DIR                Destination for all output files and\n                                   existing cubes.\n       --vmd=FILE                  VMD executable. Default is first vmd\n                                   executable found on system.\n       --vmdstate=FILE             VMD visualisation state file. Used to\n                                   determine perspective.\n       --vmdstartup=FILE           VMD script to set up general look. If none\n                                   is specified, it will default to your vmdrc.\n       --vmdtemplate=FILE          VMD template script for plotting.\n    -m --multiwfn=FILE             Multiwfn executable. Default is first\n                                   Multiwfn executable found on system\n       --cddcalculator=STRING      Program to use to calculate charge density\n                                   differnces. [multiwfn | repa]\n    -t --tachyon=FILE              Tachyon executable. Default is first tachyon\n                                   executable found on system\n       --panformat=STRING          Format of the summary to write with Pandoc.\n                                   Any of [docx | odt | latex]\n       --panref=FILE               Reference docx with formatting hints.\n       --wf=FILE                   Wavefunction file (molden or fchk).\n       --exc=FILE                  Quantum chemistry software output file with\n                                   excited state informations.\n    -i --imgres=INT,INT            Image width x heigth for plotting of cubes.\n       --s2filter=FLOAT            Filter excited states by contributions of\n                                   next higher spin state (applies to plotting\n                                   and summary).\n       --foscfilter=FLOAT          Filter excited states by minimum oscillator\n                                   strength (applies only to summary document).\n       --fwhm=FLOAT                Full width at half maximum of the gaussian\n                                   function used to convolute the stick spectrum\n                                   in electron volt.\n       --weightfilter=FLOAT        Minimum weight of an excitation to write to\n                                   the summary. (default 0.01)\n       --energyfilter=FLOAT,FLOAT  Energy range (eV) of the excited states of\n                                   interest and plot range for spectrum.\n       --states=[INT]              Plot specific states and ignore all other\n                                   criteria in the summary. Give as \"[a,b,c]\"\n       --calcsoftware=STRING       Calculation software, that produced the\n                                   output file. [gaussian | nwchem | mrcc | orca]\n       --calctype=STRING           Calculation type. [tddft | rc-adc2 (reduced\n                                   cost ADC(2))]\n       --spectrum=STRING           Program to plot the spectrum. [gnuplot |\n                                   spectrify]\n    -r --renumberstates            Renumber the states (energy order), after\n                                 high spin multiplicities have been removed by\n                                 \"--s2filter\".\n    Common flags:\n    -? --help                      Display help message\n    -V --version                   Print version information      Print version information\n\n\nAt least `--wf` and `--exc` must be set and point to your wavefunction file respective your quantum chemistry output file (with excited state information).\n\nThe destination of the output (and intermediate files) is determined by `--outdir`, which points to the path, where output shall be written. Next to writing all files to this directory, Exckel will look for potentially already existing files (such as images and cubes) in this directory. If not set, it defaults to the current directory.\n\nAn explanation of the workflow and the effects of the parameters follows.\n\n_Note:_ There is an alternative to calling `exckel exckel`, namely `exckel tabulate`, which provides other parameters but is only meant for creating table documents of many images but has nothing to do with excited state analysis.\n\n### Parsing, Plotting and Filtering\n*Relevant arguments:*\n  - `--s2filter`\n  - `--foscfilter`\n  - `--weightfilter`\n  - `--energyfilter`\n  - `--fwhm`\n  - `--states`\n\nExckel starts by parsing the quantum chemistry log file and looks for the informations regarding excitations, multiplicity, number of basis functions and so on.\n\nFrom the $\u003cS^2\u003e$ value of an excited state, one can calculate the contribution of the next higher spin state as a fractional amount. The excited states can be filtered by their spin state purity. As an example lets assume the multiplicity of your reference wavefunction was a triplet ($S = 1$). The  $\u003cS^2\u003e$ value of a pure spin state should be $\u003cS^2\u003e = S * (S + 1) = 2$. From the true $\u003cS^2\u003e$ value of the excited state, the contributions of the quintetts to the state can be calculated. If the fractional contribution of the quintett is higher than the value specified with `--s2filter`, the state will be discarded completely and not used to plot the spectrum, nor will it appear in the summary table, nor will cubes and images for it be calculated.\n\nExcited states can also be filtered by a minimum oscillator strength with `--foscfilter`. States discarded by this filter will still contribute to the spectrum, but will not appear in the summary table and CDDs and orbitals will not be calculate for this state.\n\nIf you use a very verbose output (small coefficients printed), you can restrict the number of CI determinants printed in the summary with `--weightfilter`. This will influence the summary table and the orbital cubes, that need to be calculated.\n\nGnuplot is then used to plot the spectrum (remaining states after `--s2filter` and within `--energyfilter` (in eV)) and save it to `Spectrum.png` in the output directory. A convolution of the stick spectrum is done by gaussian functions, for which the full width at half maximum can be specified with `--fwhm` (in electron Volt).\n\nIf you want to plot specific states, which can not be accessed otherwise (because they are dark for example), you can use the `--states` option. It will select only the states specified for cube generation and in the table summary but not touch the other filtering options, which are now only applied for plotting of the spectrum.\n\n### Calculating Cubes\n*Relevant arguments:*\n  - `--outdir`\n  - `--multiwfn`\n  - `--nocalcorbs`\n  - `--nocalccdds`\n  - `--energyfilter`\n  - `--cddcalculator`\n\nCharge difference densities and and orbitals are stored in cube files. If they are already present, you can use them (give `--nocalcorbs` and/or `--nocalccdds`). You will need to make sure, that they are available in the output directoy and named properly. Orbital cubes must be called `orb${NORB}.cube`, where `$NORB` is the number of the orbital (start counting from 1) and has no leading zeros. Alpha and beta orbitals of unrestricted wavefunctions are distinguished solely by this number, where the alpha orbitals have numbers from 1 to (number of basis functions) and the beta orbitals have numbers from (number of basis functions + 1) to (number of basis functions * 2). Charge difference density cube need to be labeled as `CDD${NSTATE}.cube`, the corresponding holes as `hole${NSTATE}.cube` and the electrons as `electron${NSTATE}.cube`. If cubes exist (from a previous calculation or calculated on a fast computer or something) and you want to use them, specify `--nocalccubes`. _Otherwise existing cubes will be overwritten_.\n\nIf cubes are not available yet, Exckel will call an external program to calculate orbitals from the log file and the wavefunction.\n\nThe CDDs can be calculated by Multiwfn or, if you use a QC code not supported by Multiwfn, such as NWChem, by Exckel internal functions, which neglect cross terms of the CDD. The REPA based internal calculation of CDDs is quite fast and deals with arbitrary high excitations but neglects the cross terms and needs cube for the orbitals, which can be calculated beforehand by Exckel or already be present. Be aware, that the precision here is limited by the accuracy of the log file. Also be aware that for REPA based CDDs all orbital cubes needs to be stored in RAM, so you might maybe need a few GiB.\n\nCurrently only Multiwfn is supported to calculate orbital cubes. By default the first `Multiwfn` executable found, will be used, but this can be changed by pointing `--multiwfn` to a Multiwfn executable.\n\n### Plotting cubes\n*Relevant arguments:*\n  - `--outdir`\n  - `--norenderimages`\n  - `--vmd`\n  - `--vmdstate`\n  - `--vmdstartup`\n  - `--vmdtemplate`\n  - `--tachyon`\n  - `--imgres`\n\nAll cubes found in the output directory, which follow  the correct naming scheme, will be plotted, if `--norenderimages` is not specified.\n\nThe only visualisation programm currently supported is the combination of VMD with Tachyon. To customise the appearance of the images, a variety of options is available. Most intreresting one is propably the file specified by `--vmdstartup`. This is a VMD Tcl script, which is executed by VMD before doing anything else. Here you can make general settings like colours, camera settings, ... . If this is not specified, Exckel will try going for your `.vmdrc` in the home directory and use this one. Therefore, if your happy with your defaults when opening VMD, you don't need to specify `--vmdstartup`.\n\nThe second option to customise the appearance of your images is `--vmdstate`. This argument should point to a VMD visualisation state file. Nothing except the camera perspective is taken from this file, but if it is not specified, you will need to live with the default perspective.\n\nLast, a VMD Tcl template script is specified, which is the working horse here. This specifies everything that is necessary to get actual input files for Tachyon for every cube. The script used by Exckel is available in `data/VMD.tcl` of this repository and uses the ginger template engine to replace `{{ orbs }}` by a list of file base names of orbital cubes and `{{ cdddens }}` by a list of file base names of CDDs, electrons and holes. If you want to use your own Tcl script provide it via `--vmdtemplate`. Make sure it quits VMD properly, otherwise it will stay open forever.\n\nVMD is called, writes input files for Tachyon (`*.dat`) and Tachyon (executable can be specified by `--tachyon`, defaults to first `tachyon` found) is called to render images in the resolution given by `--imgres` (defaults to 2000 x 1200 pixel). Make sure your Tachyon supports png output.\n\n### Writing the Summary Document\n*Relevant arguments:*\n  - `--outdir`\n  - `--pdformat`\n  - `--panref`\n\nFrom everything that is available up to now, the summary document will be created by [Pandoc](http://hackage.haskell.org/package/pandoc). You can choose to get the output as Microsoft Word docx (`--pdformat=docx`), as a LibreOffice/OpenOffice compatible Open Document Text odt (`pdformat=odt`) or as LaTeX source code (`pdformat=latex`).\n\nThe exact formatting of the output document depends on reference documents (`--panref`) in the case of ODT and DOCX files. If `--panref` is specified and points to a .docx or .odt document with formatting hints, these will be used. Otherwise a default is provided (and included in the executable, thanks TemplateHaskell) and automatically used.\n\nThe finaly summary is written to the output directoy as `summary.*`.\n\n### Example\nFor a Gaussian calculation of benzene, where you have `Benzen.fchk` as the wavefunction and `Benzen.log` as the log file of the calculation and want to write a summary for all excited states with an oscillator strength \u003e 0.1 as a docx.\n\n    exckel exckel --wf=Benzen.fchk --exc=Benzen.log --outdir=exckel-out --foscfilter=0.1 --panformat=docx\n\n\n## Installation\nExckel needs serveral components to do all its work. Many of them are Haskell libraries and you don't need to take care of them, but calculators for the orbitals, visualisation software and the raytracing engine are system calls to standard quantum chemistry applications. Furthermore ImageMagick and Gnuplot are needed.\n\nIf you want to build from source, you will also need Haskell's `stack` tool, which takes care of building.\n\n### Dependencies\nInstallation of the external programs is up to you. Installation of them is quite easy.\n- [Multiwfn](http://sobereva.com/multiwfn/)\n- [VMD](https://www.ks.uiuc.edu/Research/vmd/)\n  - I highly recommended to customise VMD with the `.vmdrc` to fit your needs. This requires the least complex setup from VMD startup scripts, state files and template scripts.\n- [Tachyon](http://jedi.ks.uiuc.edu/~johns/raytracer/)\n  - Can be compiled from source, but is also available in many linux distributions. The version bundled with VMD does not support PNG images.\n- [Gnuplot](http://www.gnuplot.info/)\n  - On Linux is basically always included in the distributions, easy to install on Windows.\n- [ImageMagick](https://www.imagemagick.org/)\n  - On Linux is basically always included in the distributions, easy to install on Windows.\n- If you want to use ODT or LaTeX output [Pandoc](https://github.com/jgm/pandoc)\n- If building from source [Haskell's Stack](https://docs.haskellstack.org/en/stable/README/)\n  - Can be easily installed as a binary without any knowledge of Haskell\n\n### Building from Source\nClone the repository from git, use stack to install everything.\n\n    git clone https://github.com/sheepforce/Exckel.git\n    cd Exckel\n    stack install\n\nLikely this will take some time, as especially Pandoc is a very large library, that takes some time to build.\n\nMake sure the installation directory shown by `stack` is in your `PATH`.\n\n### Installing the Binary\nFor Linux a partially statically linked binary is available, which only requires most fundamental C libraries to be available on your system. Simply copy the binary to a directory of your choice and make sure it is in your `PATH`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepforce%2Fexckel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheepforce%2Fexckel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepforce%2Fexckel/lists"}