2
$\begingroup$

My question is twofold. First, I've run into an issue working with .cif files and pandas dataframes. With BioPandas, I can read a .pdb file into a dataframe and then go the opposite direction, writing a .pdb file from a dataframe. With .cif files, I can only write into a dataframe - PandasMmcif does not contain a to_cif function like PandasPdb has a to_pdb function. Are there any alternative methods I could use to get from .cif to pandas dataframe back to .cif?

Second, the reason I am not simply converting all of my .cif files to .pdb is that I am uncertain whether I will lose data in the conversion. Is this fear unfounded? I don't know the specific differences between .pdb and .cif.

$\endgroup$
2
  • 3
    $\begingroup$ You may lose some metadata during mmCIF <-> PDB conversion (what is converted and what is ignored depends on the converter that you use), but it's the same when you load a PDB or mmCIF file into a program, modify it and write it back – some metadata may get lost. The most essential things should be preserved. Unless you have a big mmcif file that can't be converted to a standard PDB due to the limits on the number of chains and atoms in the PDB format (there are workarounds for this used by some converters). $\endgroup$
    – marcin
    Sep 27, 2022 at 7:33
  • $\begingroup$ Perfect, thank you! $\endgroup$
    – Brookspj
    Sep 27, 2022 at 18:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.