Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
add flags for ianalyze and neighborlist #511 and #508
Browse files Browse the repository at this point in the history
Signed-off-by: felipez <tifonzafel@gmail.com>
  • Loading branch information
felipeZ committed Jul 16, 2020
1 parent b1f8b12 commit 0ce46c2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Version 1.7-dev
- added verbose option for rootfinder (#503)
- fix orca pointcharges (#504)
- remove constant cutoff from neighborlist (#508)
- fix default and flags properties issue (#511)

Version 1.6.1 (released 21.06.20)
=================================
Expand Down
3 changes: 3 additions & 0 deletions share/xtp/xml/ianalyze.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
<resolution_logJ2 help="Bin size of histogram log(J2)" default="0.5" choices="float+"/>
<resolution_space help="Bin size for r in log(J2(r))" unit="nm" default="0.05" choices="float+"/>
<states help="states to analyze" default="e, h, s, t" choices="[e,h,s,t]"/>
<do_pairtype default="false" choices="bool"/>
<pairtype help="method to compute the pairtype" choices="Hopping,Excitoncl"/>
<do_resolution_spatial default="false" choices="bool"/>
</ianalyze>
</options>
6 changes: 6 additions & 0 deletions share/xtp/xml/neighborlist.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0"?>
<options>
<neighborlist help="Determines neighbouring pairs for exciton transport" section="sec:neighborlist">
<type help="segments names if the segmentname method is used"/>
<cutoff help="cutoff value if the segmentname method is used" unit="nm"/>
<cutoff_type help="method to define the cutoff" default="constant" choices="constant,segmentname"/>
<constant help="cutoff for all other types of pairs if the constant method is used" unit="nm" default="1.5" choices="float+"/>
<use_exciton_cutoff help="Use exciton cutoff" default="false" choices="bool"/>
<exciton_cutoff help="value" units="nm">
</neighborlist>
</options>
4 changes: 2 additions & 2 deletions src/libxtp/calculators/ianalyze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void IAnalyze::Initialize(const tools::Property &user_options) {
}

_resolution_logJ2 = options.get(".resolution_logJ2").as<double>();
if (options.exists(".pairtype")) {
if (options.get(".pairtype").as<bool>()) {
_do_pairtype = true;
std::string _store_stdstring = options.get(".pairtype").as<std::string>();
if (_store_stdstring.find("Hopping") != std::string::npos) {
Expand All @@ -59,7 +59,7 @@ void IAnalyze::Initialize(const tools::Property &user_options) {
_do_pairtype = false;
}
}
if (options.exists(".resolution_spatial")) {
if (options.get(".do_resolution_spatial").as<bool>()) {
_resolution_spatial = options.get(".resolution_spatial").as<double>();
if (_resolution_spatial != 0.0) {
_do_IRdependence = true;
Expand Down
5 changes: 3 additions & 2 deletions src/libxtp/calculators/neighborlist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ void Neighborlist::Initialize(const tools::Property& user_options) {
}
}

if (options.exists(".constant")) {
const std::string& cutoff_type = options.get("cutoff_type").as<std::string>();
if (cutoff_type == "constant") {
_useConstantCutoff = true;
_constantCutoff =
options.get(".constant").as<double>() * tools::conv::nm2bohr;
} else {
_useConstantCutoff = false;
}
if (options.exists(".exciton_cutoff")) {
if (options.get(".use_exciton_cutoff").as<bool>()) {
_useExcitonCutoff = true;
_excitonqmCutoff =
options.get(".exciton_cutoff").as<double>() * tools::conv::nm2bohr;
Expand Down

0 comments on commit 0ce46c2

Please sign in to comment.