Skip to content
Snippets Groups Projects
Commit 9e290dd9 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

mmcif writer: basic SaveMMCIF function in ost.io

no documentation or fancy features yet
parent 93fd5743
Branches
Tags
No related merge requests found
...@@ -462,6 +462,17 @@ def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None, ...@@ -462,6 +462,17 @@ def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None,
except: except:
raise raise
def SaveMMCIF(ent, filename, data_name="OST_structure"):
"""
Save entity - All fantastic documentation comes here
"""
writer = MMCifWriter()
writer.SetStructure(ent)
writer.Write(data_name, filename)
# this function uses a dirty trick: should be a member of MMCifInfoBioUnit # this function uses a dirty trick: should be a member of MMCifInfoBioUnit
# which is totally C++, but we want the method in Python... so we define it # which is totally C++, but we want the method in Python... so we define it
# here (__init__) and add it as a member to the class. With this, the first # here (__init__) and add it as a member to the class. With this, the first
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment