Hi, I am very excited to read the paper from arXiv and then tried this package. However, I could not repeat the example in your paper (on page 4) as follows.
from pyrovskite.builder import make_2drp
A = "./methylammonium.xyz"
Ap = "./butylammonium.xyz"
org_A_2drp = make_2drp (Ap , A, "Pb", "I", 2, 3)
in_A_2drp = make_2drp (Ap , "Cs", "Pb", "I", 2, 3)
I was in the directory of /public/home/clxy_wh/BACKUP/pyrovskite/tests/data
.
There are many .cif
and .xyz
files, shown below.
(pyrovskite) [clxy_wh@login data]$ ls
3AMP_CsInSbI_dj.cif mapbi3_2x2x2.cif methylammonium.xyz test_bulk.json test_mono.json testvcopt_fcopt.cif testvcopt_vcopt.inp
benzylammonium.xyz mapbi3.cif test_2ddouble_dj.json test_dj.json test_perovskite_1.cif testvcopt_fcopt.py
mapbi_2d_diag.cif mapbi_3d_diag.cif test_2ddouble_rp.json test_double.json test_rp.json testvcopt_vcopt.cif
I can find the methylammonium.xyz
file as demonstrated in the paper, but there is only benzylammonium.xyz
instead of butylammonium.xyz
.
The codes below were what I tried. (I installed the Pyrovskite package in the virtual environment via Anaconda 3).
(pyrovskite) [clxy_wh@login data]$ python
Python 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyrovskite.builder import make_2drp
>>>
>>> Ap = "./benzylammonium.xyz"
>>> in_A_2drp = make_2drp(Ap, "Cs", "Pb", "I", 2, 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/public/home/clxy_wh/BACKUP/pyrovskite/pyrovskite/builder.py", line 278, in make_2drp
raise ValueError("Ap must be a molecule in the form of an Atoms "
ValueError: Ap must be a molecule in the form of an Atoms object, not a single atom as a string.
>>>
I also tried to use the methylammonium.xyz
as Ap, however, the same ValueError appeared.
Could you please kindly help me to fix it? Thanks a lot.