<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>It looks me like there is some problem with the Python interpreter in your environment, not the code itself.<br></div><div>You can try to add this following line at the beginning of your python script and rerun it:</div><div><span style="text-align:left;color:rgb(136,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none;background-color:rgb(245,245,245)">#!/usr/bin/env python</span><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div>I found a similar problem <a href="https://answers.ros.org/question/164091/rosrun-of-a-working-python-script-fails/ ">here</a>: </div><div>by the way, are you running it on a Window? </div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 12:56 PM rekha sharma <<a href="mailto:rekha1997jpr@gmail.com">rekha1997jpr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr">Now I am getting <div>import-im6.q16: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9186.<br><div>when I do</div><div>import mcu<br></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 11:15 PM Hung Pham <<a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hell Rekha,</div><div><br></div><div>I guess you downloaded the master branch, I haven't had time to document the codes yet with many new functions.</div><div>Hence, the latest code remains in the dev branch, please:</div><div><br></div><div><span style="text-align:left;color:rgb(35,40,45);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Menlo,Consolas,monaco,monospace;font-size:inherit;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none;background-color:rgb(244,244,244)">git clone -b dev <a href="https://github.com/hungpham2017/mcu.git" target="_blank">https://github.com/hungpham2017/mcu.git</a>
<font color="#004000" face="Arial,Helvetica,sans-serif" style="background-color:rgb(255,255,255)">let me know if you have any other questions.
Hung</font></span><br></div></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 12:40 PM rekha sharma <<a href="mailto:rekha1997jpr@gmail.com" target="_blank">rekha1997jpr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr">Dear Sir,<div>I have cloned it and then added the path to ~/.bashrc.</div><div><br></div><div>But my import mcu is not working.</div><div><br></div><div>My python path is:</div><div>export PYTHONPATH=/home/rekha/mcu:$PYTHONPATH<br></div><div><br></div><div>I have created a file "mcu.py" in which I kept </div></div><span style="font-size:13.33px">import mcu</span><br style="font-size:13.33px"><span style="font-size:13.33px">work = mcu.CELL(cif='conventional.</span><span style="font-size:13.33px">cif')</span><br style="font-size:13.33px"><span style="font-size:13.33px">prim_cell = work.to_prim_cell()</span><br style="font-size:13.33px"><span style="font-size:13.33px">work.write_cif(prim_cell, filename='primitive')</span><div><span style="font-size:13.33px"><br></span></div><div><span style="font-size:13.33px">and then invoked</span></div><div><span style="font-size:13.33px"><br></span></div><div><span style="font-size:13.33px">python mcu.py</span></div><div><span style="font-size:13.33px"><br></span></div><div><span style="font-size:13.33px">this gives me error</span></div><div><span style="font-size:13.33px"><br></span></div><div>Traceback (most recent call last):<br> File "mcu.py", line 1, in <module><br> import mcu<br> File "/home/rekha/case/mcu.py", line 2, in <module><br> work = mcu.CELL(cif='conventional.cif')<br>AttributeError: module 'mcu' has no attribute 'CELL'</div><div><br></div><div><br></div><div>I am having my conventional.cif in "/home/rekha/case/" directory.</div><div><br></div><div><br></div><div>What should I do now?</div><div><br></div><div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 10:44 PM Hung Pham <<a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div dir="ltr">Sorry, there was a typo in the example script, it should be this:</div><blockquote style="padding:0px;margin-top:0px;margin-right:0px;margin-bottom:0px" dir="ltr"><div><span style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:rgb(255,255,255)">import mcu</span><br style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;white-space:normal"><span style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:rgb(255,255,255)">work = mcu.CELL(cif='conventional.</span><span style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:rgb(255,255,255)">cif')</span><br style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;white-space:normal"><span style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:rgb(255,255,255)">prim_cell = work.to_prim_cell()</span><br style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;white-space:normal"><span style="text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,Helvetica,sans-serif;font-size:13.33px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;float:none;background-color:rgb(255,255,255)">work.write_cif(prim_cell, filename='primitive')</span></div><div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div></blockquote><div>Hung Pham</div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 12:12 PM Hung Pham <<a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>Hello Rekha,</div><div><br></div><div><a href="https://spglib.github.io/spglib/index.html" target="_blank">Spglib library</a> is doing what you are looking for. Spglib has a python interface and can be easily installed via Pip or conda..</div><div>But you need to make a cell tuple (from CIF) which contains the lattice information, this requires some minimal Python programming.</div><div>My <a href="https://github.com/hungpham2017/mcu/tree/dev" target="_blank">MCU</a> 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:</div><blockquote style="padding:0px;margin-top:0px;margin-right:0px;margin-bottom:0px"><div>import mcu<br>work = mcu.CELL(cif='conventional.cif')<br>primitive = work.to_prim_cell()<br>work.write_cif(prim_cell, filename='primitive')<strike></strike></div></blockquote><div>If you are interested in this, I can assist further.</div><div>Hung Pham</div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020 at 11:57 AM rekha sharma <<a href="mailto:rekha1997jpr@gmail.com" target="_blank">rekha1997jpr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div>Thank you very much sir,</div><div dir="auto"><br></div><div dir="auto">My materials are very new and not available in any database.<br><br><div class="gmail_quote" dir="auto"><div class="gmail_attr" dir="ltr">On Thu, Jul 16, 2020, 22:24 Yuvam Bhateja <<a href="mailto:yuvamb16@gmail.com" target="_blank">yuvamb16@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto">Hello Rekha<div dir="auto"><br></div><div dir="auto">You can check out "Material Project".</div><div dir="auto">It's a database where researchers share their findings and results of several different types of materials and of different applications.</div><div dir="auto"><br></div><div dir="auto">Every compound is available in primitive, conventional, computed and symmetric unit cell, etc.</div><div dir="auto">Hope you find this useful.</div><div dir="auto"><br></div><div dir="auto">Regards</div><div dir="auto">Yuvam Bhateja</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, 16 Jul 2020, 7:40 pm rekha sharma, <<a href="mailto:rekha1997jpr@gmail.com" target="_blank" rel="noreferrer">rekha1997jpr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr">Dear Expert Users,<div><br><div>It is possible that this question has been answered many times before but I could not find it on the forum.</div><div><br></div><div>I have few complex structures and it is not possible to handle on my system in the conventional form.</div><div><br></div><div>Can you please advise any tool that can help me to convert a conventional cell cif file to a primitive cell file?</div><div><br></div><div>I have tried with VEST (niggli cell reduction) but it does not work for me. </div><div><br></div><div>Thank you very much.</div><div><div>Rekha<br></div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer noreferrer noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank" rel="noreferrer noreferrer">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer noreferrer noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank" rel="noreferrer">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Hung Q. Pham</div><div>Gagliardi Group</div><div>Office: Smith 101</div><div>Email: <a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a></div><div>Personal page: <a href="http://hungpham2017.github.io" target="_blank">hungpham2017.github.io</a><br></div><div dir="ltr"><span style="font-size:12.8px">Department of Chemistry</span><br></div><div dir="ltr"><span style="font-size:12.8px">University of Minnesota - Twin Cities, </span><span style="font-size:12.8px">Minneapolis, MN 55455</span></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Hung Q. Pham</div><div>Gagliardi Group</div><div>Office: Smith 101</div><div>Email: <a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a></div><div>Personal page: <a href="http://hungpham2017.github.io" target="_blank">hungpham2017.github.io</a><br></div><div dir="ltr"><span style="font-size:12.8px">Department of Chemistry</span><br></div><div dir="ltr"><span style="font-size:12.8px">University of Minnesota - Twin Cities, </span><span style="font-size:12.8px">Minneapolis, MN 55455</span></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4">Best wishes</font></div><div><br></div><div><div><font color="#000000" face="georgia, serif" size="4">Ms. Rekha</font></div><div><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">Teaching Assistant,</span></div><div><font color="#000000" face="georgia, serif" size="4">Department of Physics</font></div><div><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">RK college, Jaipur, </span><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">India</span></div><div><font color="#000000" face="georgia, serif" size="4">Mob.: +11 90-95 790 71 697</font></div><div><font color="#000000" face="georgia, serif" size="4">Email: <a href="mailto:rekha1997jpr@gmail.com" target="_blank">rekha1997jpr@gmail.com</a></font></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Hung Q. Pham</div><div>Gagliardi Group</div><div>Office: Smith 101</div><div>Email: <a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a></div><div>Personal page: <a href="http://hungpham2017.github.io" target="_blank">hungpham2017.github.io</a><br></div><div dir="ltr"><span style="font-size:12.8px">Department of Chemistry</span><br></div><div dir="ltr"><span style="font-size:12.8px">University of Minnesota - Twin Cities, </span><span style="font-size:12.8px">Minneapolis, MN 55455</span></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4"><br></font></div><div><font face="georgia, serif" size="4">Best wishes</font></div><div><br></div><div><div><font color="#000000" face="georgia, serif" size="4">Ms. Rekha</font></div><div><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">Teaching Assistant,</span></div><div><font color="#000000" face="georgia, serif" size="4">Department of Physics</font></div><div><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">RK college, Jaipur, </span><span style="color:rgb(0,0,0);font-family:georgia,serif;font-size:large">India</span></div><div><font color="#000000" face="georgia, serif" size="4">Mob.: +11 90-95 790 71 697</font></div><div><font color="#000000" face="georgia, serif" size="4">Email: <a href="mailto:rekha1997jpr@gmail.com" target="_blank">rekha1997jpr@gmail.com</a></font></div></div></div></div></div></div>
_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature" dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Hung Q. Pham</div><div>Gagliardi Group</div><div>Office: Smith 101</div><div>Email: <a href="mailto:phamx494@umn.edu" target="_blank">phamx494@umn.edu</a></div><div>Personal page: <a href="http://hungpham2017.github.io" target="_blank">hungpham2017.github.io</a><br></div><div dir="ltr"><span style="font-size:12.8px">Department of Chemistry</span><br></div><div dir="ltr"><span style="font-size:12.8px">University of Minnesota - Twin Cities, </span><span style="font-size:12.8px">Minneapolis, MN 55455</span></div></div></div></div></div></div></div></div></div></div></div></div></div>