Skip to content

Commit

Permalink
bugfix preventing modes higher than ground state from being sampled i…
Browse files Browse the repository at this point in the history
…n qc init
  • Loading branch information
corinwagen committed Jul 1, 2021
1 parent 2c55e5b commit 1c3ac6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cctk/vibrational_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def choose_level(self, temperature=298):
return 0

# zpe_ratio is probability of being in level i vs level i+1, by quantum harmonic oscillator
zpe_ratio = math.exp( -2 * self.energy() / BOLTZMANN_CONSTANT * temperature)
zpe_ratio = math.exp( -2 * self.energy() / (BOLTZMANN_CONSTANT * temperature))
if zpe_ratio > MAX_ZPE_RATIO:
zpe_ratio = MAX_ZPE_RATIO

Expand Down Expand Up @@ -178,7 +178,7 @@ def quantum_distribution_max(self, level=0, num_pts=1e5):

# there is certainly a better way to do this
max_p = 0
for x in np.linspace(0, max_x, num_pts):
for x in np.linspace(0, max_x, int(num_pts)):
p = self.quantum_distribution_value(x, level)
if p > max_p:
max_p = p
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
packages=["cctk", "cctk.data", "cctk.groups"],
# include_package_data=True,
package_data={"cctk.data": ["*"], "cctk.groups": ["*"],},
version="v0.2.11",
version="v0.2.12",
license="Apache 2.O",
description="computational chemistry toolkit",
author="Corin Wagen and Eugene Kwan",
author_email="corin.wagen@gmail.com",
url="https://github.com/ekwan/cctk",
download_url="https://github.com/ekwan/cctk/archive/v0.2.11.tar.gz",
download_url="https://github.com/ekwan/cctk/archive/v0.2.12.tar.gz",
install_requires=["numpy", "networkx", "importlib_resources", "scipy", "pyahocorasick", "basis_set_exchange", "pyyaml"],
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 1c3ac6c

Please sign in to comment.