run_pyscf does not work on PyscfMolecularData
まだ誰も着手していません。
評価
調査の方向性
The failure is at molecule.canonical_orbitals = ... in run_pyscf in openfermionpyscf/_run_pyscf.py, where PyscfMolecularData exposes these fields as read-only properties. Decide whether to add setters or compute the fields on the fly, which the issue leaves open and a maintainer must settle first. Done means the reproduction snippet runs and a test covers the chosen design.
索引モデルが issue の本文から書いたものです。
説明
Input:
from openfermionpyscf import PyscfMolecularData, run_pyscf
geometry = [('Li', (0., 0., 0.)), ('H', (0., 0., 1.4))]
basis = 'sto-3g'
multiplicity = 1
charge = 0
molecule = run_pyscf(
PyscfMolecularData(geometry, basis, multiplicity, charge)
)
Output:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-bf13348427ff> in <module>()
7
8 molecule = run_pyscf(
----> 9 PyscfMolecularData(geometry, basis, multiplicity, charge)
10 )
~/Projects/OpenFermion-PySCF/openfermionpyscf/_run_pyscf.py in run_pyscf(molecule, run_scf, run_mp2, run_cisd, run_ccsd, run_fci, verbose)
143
144 # Populate fields.
--> 145 molecule.canonical_orbitals = pyscf_scf.mo_coeff.astype(float)
146 molecule.orbital_energies = pyscf_scf.mo_energy.astype(float)
147
AttributeError: can't set attribute
The reason is that PyscfMolecularData has canonical_orbitals, etc., as properties rather than attributes. One could fix this by adding setters, but I don't know what the correct design or intended usage is. If we can calculate stuff on the fly, then perhaps we don't even need to perform run_pyscf on a PyscfMolecularData? @sunqm
- 主要言語
- Python
- スター
- 118
- フォーク
- 46
- 平均マージ
- 3分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quantumlib/OpenFermion-PySCF のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
quantumlib/OpenFermion-PySCF#66 · コメント 2 件 ·
-
Return none spin summed rdms再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンgood first issue
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
quantumlib/OpenFermion-PySCF#52 · コメント 4 件 ·
quantumlib/OpenFermion-PySCF の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OpenFreeEnergy/openfe#2371 ·
メンテナーはふだん 2 日以内に返信
-
HMDB's smiles file writes "None" for metabolites with an empty <smiles/> (file not currently used)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
NCATSTranslator/Babel#1269 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
404 on sample dataオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
bcgov/nr-hydrometric-rating-curve#443 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100