[QE-users] Need a script that can convert primitive cell file file using conventional cell cif file
rekha sharma
rekha1997jpr at gmail.com
Thu Jul 16 19:40:13 CEST 2020
Dear Sir,
I have cloned it and then added the path to ~/.bashrc.
But my import mcu is not working.
My python path is:
export PYTHONPATH=/home/rekha/mcu:$PYTHONPATH
I have created a file "mcu.py" in which I kept
import mcu
work = mcu.CELL(cif='conventional.cif')
prim_cell = work.to_prim_cell()
work.write_cif(prim_cell, filename='primitive')
and then invoked
python mcu.py
this gives me error
Traceback (most recent call last):
File "mcu.py", line 1, in <module>
import mcu
File "/home/rekha/case/mcu.py", line 2, in <module>
work = mcu.CELL(cif='conventional.cif')
AttributeError: module 'mcu' has no attribute 'CELL'
I am having my conventional.cif in "/home/rekha/case/" directory.
What should I do now?
On Thu, Jul 16, 2020 at 10:44 PM Hung Pham <phamx494 at umn.edu> wrote:
> Sorry, there was a typo in the example script, it should be this:
>
> import mcu
> work = mcu.CELL(cif='conventional.cif')
> prim_cell = work.to_prim_cell()
> work.write_cif(prim_cell, filename='primitive')
>
> Hung Pham
>
> On Thu, Jul 16, 2020 at 12:12 PM Hung Pham <phamx494 at umn.edu> wrote:
>
>> Hello Rekha,
>>
>> Spglib library <https://spglib.github.io/spglib/index.html> is doing
>> what you are looking for. Spglib has a python interface and can be easily
>> installed via Pip or conda..
>> But you need to make a cell tuple (from CIF) which contains the lattice
>> information, this requires some minimal Python programming.
>> My MCU <https://github.com/hungpham2017/mcu/tree/dev> project supports
>> CIF file as well as the QE output files and it has cell analysis functions
>> using spglib. Within a few lines of code, you can get what you want in the
>> desired format. For example, in a Python interpreter or script:
>>
>> import mcu
>> work = mcu.CELL(cif='conventional.cif')
>> primitive = work.to_prim_cell()
>> work.write_cif(prim_cell, filename='primitive')
>>
>> If you are interested in this, I can assist further.
>> Hung Pham
>>
>>
>> On Thu, Jul 16, 2020 at 11:57 AM rekha sharma <rekha1997jpr at gmail.com>
>> wrote:
>>
>>> Thank you very much sir,
>>>
>>> My materials are very new and not available in any database.
>>>
>>> On Thu, Jul 16, 2020, 22:24 Yuvam Bhateja <yuvamb16 at gmail.com> wrote:
>>>
>>>> Hello Rekha
>>>>
>>>> You can check out "Material Project".
>>>> It's a database where researchers share their findings and results of
>>>> several different types of materials and of different applications.
>>>>
>>>> Every compound is available in primitive, conventional, computed and
>>>> symmetric unit cell, etc.
>>>> Hope you find this useful.
>>>>
>>>> Regards
>>>> Yuvam Bhateja
>>>>
>>>> On Thu, 16 Jul 2020, 7:40 pm rekha sharma, <rekha1997jpr at gmail.com>
>>>> wrote:
>>>>
>>>>> Dear Expert Users,
>>>>>
>>>>> It is possible that this question has been answered many times before
>>>>> but I could not find it on the forum.
>>>>>
>>>>> I have few complex structures and it is not possible to handle on my
>>>>> system in the conventional form.
>>>>>
>>>>> Can you please advise any tool that can help me to convert
>>>>> a conventional cell cif file to a primitive cell file?
>>>>>
>>>>> I have tried with VEST (niggli cell reduction) but it does not work
>>>>> for me.
>>>>>
>>>>> Thank you very much.
>>>>> Rekha
>>>>> _______________________________________________
>>>>> Quantum ESPRESSO is supported by MaX (
>>>>> www.max-centre.eu/quantum-espresso)
>>>>> users mailing list users at lists.quantum-espresso.org
>>>>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>>>
>>>> _______________________________________________
>>>> Quantum ESPRESSO is supported by MaX (
>>>> www.max-centre.eu/quantum-espresso)
>>>> users mailing list users at lists.quantum-espresso.org
>>>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>>
>>> _______________________________________________
>>> Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso
>>> )
>>> users mailing list users at lists.quantum-espresso.org
>>> https://lists.quantum-espresso.org/mailman/listinfo/users
>>
>>
>>
>> --
>>
>> Hung Q. Pham
>> Gagliardi Group
>> Office: Smith 101
>> Email: phamx494 at umn.edu
>> Personal page: hungpham2017.github.io
>> Department of Chemistry
>> University of Minnesota - Twin Cities, Minneapolis, MN 55455
>>
>
>
> --
>
> Hung Q. Pham
> Gagliardi Group
> Office: Smith 101
> Email: phamx494 at umn.edu
> Personal page: hungpham2017.github.io
> Department of Chemistry
> University of Minnesota - Twin Cities, Minneapolis, MN 55455
> _______________________________________________
> Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
> users mailing list users at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/users
--
Best wishes
Ms. Rekha
Teaching Assistant,
Department of Physics
RK college, Jaipur, India
Mob.: +11 90-95 790 71 697
Email: rekha1997jpr at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20200716/a4fef89a/attachment.html>
More information about the users
mailing list