Answers.Body: <p>As @Michael said PyMOL can do this. PyMOL is not only an app, but also a python package —installed <a href="https://anaconda.org/schrodinger/pymol" rel="nofollow noreferrer">via conda</a> not via the regular download (you can have both).</p>
  <pre><code>import pymol2
  with pymol2.PyMOL() as pymol:
       pymol.cmd.load(infile,'myprotein')
       pymol.cmd.save(infile.replace('.cif', '.pdb'), selection='myprotein')
  </code></pre>
  <p>This runs the parallelisable instance, so you can have that context manager block running on how many threads or processes you fancy.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-15T22:08:54.093Z
Answers.Text: Dear Matteo, thanks for that. Unfortunately it gives me back the error that 'name 'infile' is not defined'.
Answers.UserDisplayName: Balint Biro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-15T22:16:48.877Z
Answers.Text: @BalintBiro You need to change that part so that it matches the name of the file you are using.
Answers.UserDisplayName: user438383
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-15T22:32:47.040Z
Answers.Text: 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.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-15T21:26:11.710Z
Answers.LastActivityDate: 2020-10-15T21:26:11.710Z
Answers.UserDisplayName: Matteo Ferla
Body: <p>can you please give me an advice how to convert .cif files into .pdb preferably using python?</p>
  <p>Thanks in advance!
  Best,
  Balint Biro</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-15T16:13:05.013Z
Comments.Text: 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
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-15T22:07:58.157Z
Comments.Text: Dear Michael,yes, that is the case but I cant see how should I modify my question...
Comments.UserDisplayName: Balint Biro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-16T10:20:55.480Z
Comments.Text: Using the [edit] button :-)
Comments.UserDisplayName: Kamil S Jaron
Tags: <python><pdb>
Title: .cif .pdb conversion with python
ThreadText: # .cif .pdb conversion with python
  
  (Asked by: username_0 on 2020-10-15)
  
  can you please give me an advice how to convert .cif files into .pdb preferably using python?
  
  Thanks in advance!
  Best,
  username_0
  
  **Tags:** python, pdb
  
  > **Comments:**
  > **username_1**: 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  
  > **username_0**: Dear Michael,yes, that is the case but I cant see how should I modify my question...  
  > **username_2**: Using the [edit] button :-)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2020-10-15. Score: 3 | Accepted answer
  
  As @Michael said PyMOL can do this. PyMOL is not only an app, but also a python package —installed [via conda](https://anaconda.org/schrodinger/pymol) not via the regular download (you can have both).
  
  ```
  import pymol2
  with pymol2.PyMOL() as pymol:
       pymol.cmd.load(infile,'myprotein')
       pymol.cmd.save(infile.replace('.cif', '.pdb'), selection='myprotein')
  
  ```
  
  This runs the parallelisable instance, so you can have that context manager block running on how many threads or processes you fancy.
  
  > **Comments:**
  > **username_0**: Dear username_3, thanks for that. Unfortunately it gives me back the error that 'name 'infile' is not defined'.  
  > **username_4**: @username_0 You need to change that part so that it matches the name of the file you are using.  
  > **username_1**: Hi @username_0 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.  
  
  ---
  
  