# .cif .pdb conversion with python

can you please give me an advice how to convert .cif files into .pdb preferably using python?

Thanks in advance! Best, Balint Biro

• Its certainly doable and PyMol will also do this. A number of site members hold this expertise. What I think is that the format you are downloading in is cif rather than what you want which is pdb. If that is the case please modify your question – M__ Oct 15 '20 at 16:13
• Dear Michael,yes, that is the case but I cant see how should I modify my question... – Balint Biro Oct 15 '20 at 22:07
• Using the edit button :-) – Kamil S Jaron Oct 16 '20 at 10:20

As @Michael said PyMOL can do this. PyMOL is not only an app, but also a python package —installed via conda not via the regular download (you can have both).

import pymol2
with pymol2.PyMOL() as pymol:

• Hi @BalintBiro please upvote or mark 'accepted'. This is the answer. You need to define the location of the infile before the with statement starts, thats why you have the error. You need a certain degree of coding proficiency. – M__ Oct 15 '20 at 22:32