Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
a5c5c722
Commit
a5c5c722
authored
1 year ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
mmcif writer: docu update
parent
404baa79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/doc/mmcif.rst
+39
-0
39 additions, 0 deletions
modules/io/doc/mmcif.rst
with
39 additions
and
0 deletions
modules/io/doc/mmcif.rst
+
39
−
0
View file @
a5c5c722
...
...
@@ -1794,6 +1794,45 @@ The special cases listed above (_atom_site.auth_asym_id,
_pdbx_poly_seq_scheme.pdb_strand_id, _atom_site.auth_seq_id etc.) are
treated the same as if *mmcif_conform* was true.
To see it all in action:
.. code-block:: python
from ost import io
ent = io.LoadMMCIF("1a0s", remote=True)
writer = io.MMCifWriter()
# The MMCifWriter is still object of type StarWriter
# I can decorate my mmCIF file with any data I want
val = io.StarWriterValue.FromInt(42)
data_item = io.StarWriterDataItem("_the", "answer", val)
writer.Push(data_item)
# pre-define mmCIF entity which is total nonsense
entity_info = io.MMCifWriterEntityList()
mon_ids = ost.StringList()
mon_ids.append("ALA")
mon_ids.append("GLU")
mon_ids.append("ALA")
lib = conop.GetDefaultLib()
mmcif_ent = io.MMCifWriterEntity.FromPolymer("polypeptide(L)",
mon_ids, lib)
entity_info.append(mmcif_ent)
# The actual relevant part... mmcif_conform can be set to
# True, as we loaded from mmCIF file
writer.SetStructure(ent, mmcif_conform = True,
entity_info = entity_info)
# And write...
writer.Write("1a0s", "1a0s.cif.gz")
# The written mmCIF file will contain _the.answer and
# writes out the mmCIF entity we defined above in
# _entity_poly. However, nothing matches that entity...
.. class:: MMCifWriterEntity
Defines mmCIF entity which will be written in :class:`MMCifWriter`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment