OpenStructure
__init__.py
Go to the documentation of this file.
1 #------------------------------------------------------------------------------
2 # This file is part of the OpenStructure project <www.openstructure.org>
3 #
4 # Copyright (C) 2008-2020 by the OpenStructure authors
5 #
6 # This library is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU Lesser General Public License as published by the Free
8 # Software Foundation; either version 3.0 of the License, or (at your option)
9 # any later version.
10 # This library is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 # details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with this library; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #------------------------------------------------------------------------------
19 import os, tempfile, ftplib, http.client
20 
21 from ._ost_io import *
22 from ost import mol, geom, conop, seq
23 
24 class IOProfiles:
25  def __init__(self):
26  self._dict_dict={}
27 
28  if conop.GetDefaultLib():
29  processor = conop.RuleBasedProcessor(conop.GetDefaultLib())
30  else:
31  processor = conop.HeuristicProcessor()
32  self['STRICT'] = IOProfile(dialect='PDB', fault_tolerant=False,
33  processor=processor.Copy())
34  self['SLOPPY'] = IOProfile(dialect='PDB', fault_tolerant=True,
35  processor=processor.Copy())
36  self['CHARMM'] = IOProfile(dialect='CHARMM', fault_tolerant=True,
37  processor=processor.Copy())
38  self['DEFAULT'] = 'STRICT'
39 
40  def __getitem__(self, key):
41  return IOProfileRegistry.Instance().Get(key)
42 
43  def __setitem__(self, key, value):
44  if isinstance(value, str):
45  value=self[value].Copy()
46  IOProfileRegistry.Instance().Set(key, value)
47  self._dict_dict[key]=value
48 
49  def Get(self, key):
50  """ Getter which keeps compound library up to date
51 
52  Keeps compound library for default profiles up to date. Reason for that is
53  that conop.SetDefaultLib() after importing io has no effect. Processors
54  (and the associated compound library) are set at import. Custom profiles,
55  i.e. profiles that are not defined in constructor of this class, are
56  returned as is without any update.
57  """
58  if key not in ['STRICT', 'SLOPPY', 'CHARMM', 'DEFAULT']:
59  return self[key].Copy()
60  prof = self[key].Copy()
61  if conop.GetDefaultLib():
62  processor = conop.RuleBasedProcessor(conop.GetDefaultLib())
63  else:
64  processor = conop.HeuristicProcessor()
65  prof.processor = processor
66  return prof
67 
68  def __len__(self):
69  return len(self._dict_dict)
70 
71  def __iter__(self):
72  return self._dict_dict.__iter__()
73 
74 profiles = IOProfiles()
75 
76 def _override(val1, val2):
77  if val2!=None:
78  return val2
79  else:
80  return val1
81 
82 def LoadPDB(filename, restrict_chains="", no_hetatms=None,
83  fault_tolerant=None, load_multi=False,
84  join_spread_atom_records=None, calpha_only=None,
85  profile='DEFAULT', remote=False, remote_repo='pdb',
86  dialect=None, seqres=False, bond_feasibility_check=None,
87  read_conect=False):
88  """
89  Load PDB file from disk and return one or more entities. Several options
90  allow to customize the exact behaviour of the PDB import. For more information
91  on these options, see :doc:`profile`.
92 
93  Residues are flagged as ligand if they are mentioned in a HET record.
94 
95  :param filename: File to be loaded
96  :type filename: :class:`str`
97 
98  :param restrict_chains: If not an empty string, only chains listed in the
99  string will be imported.
100  :type restrict_chains: :class:`str`
101 
102  :param no_hetatms: If set to True, HETATM records will be ignored. Overrides
103  the value of :attr:`IOProfile.no_hetatms`
104  :type no_hetatms: :class:`bool`
105 
106  :param fault_tolerant: Enable/disable fault-tolerant import. If set, overrides
107  the value of :attr:`IOProfile.fault_tolerant`.
108  :type fault_tolerant: :class:`bool`
109 
110  :param load_multi: If set to True, a list of entities will be returned instead
111  of only the first. This is useful when dealing with
112  multi-PDB files.
113  :type load_multi: :class:`bool`
114 
115  :param join_spread_atom_records: If set, overrides the value of
116  :attr:`IOProfile.join_spread_atom_records`.
117  :type join_spread_atom_records: :class:`bool`
118 
119  :param calpha_only: When set to true, forces the importer to only load atoms
120  named CA. If set, overrides the value of
121  :attr:`IOProfile.calpha_only`.
122  :type calpha_only: :class:`bool`
123 
124  :param profile: Aggregation of flags and algorithms to control import and
125  processing of molecular structures. Can either be a
126  :class:`str` specifying one of the default profiles
127  ['DEFAULT', 'SLOPPY', 'CHARMM', 'STRICT'] or an actual object
128  of type :class:`ost.io.IOProfile`. If a :class:`str` defines
129  a default profile, :attr:`IOProfile.processor` is set to
130  :class:`ost.conop.RuleBasedProcessor` with the currently
131  set :class:`ost.conop.CompoundLib` available as
132  :func:`ost.conop.GetDefaultLib()`. If no
133  :class:`ost.conop.CompoundLib` is available,
134  :class:`ost.conop.HeuristicProcessor` is used instead. See
135  :doc:`profile` for more info.
136  :type profile: :class:`str`/:class:`ost.io.IOProfile`
137 
138  :param remote: If set to True, the method tries to load the pdb from the remote
139  repository given as *remote_repo*. The filename is then
140  interpreted as the entry id as further specified for the
141  *remote_repo* parameter.
142  :type remote: :class:`bool`
143 
144  :param remote_repo: Remote repository to fetch structure if *remote* is True.
145  Must be one in ['pdb', 'smtl', 'pdb_redo']. In case of
146  'pdb' and 'pdb_redo', the entry must be given as lower
147  case pdb id, which loads the deposited assymetric unit
148  (e.g. '1ake'). In case of 'smtl', the entry must also
149  specify the desired biounit (e.g. '1ake.1').
150  :type remote_repo: :class:`str`
151 
152  :param dialect: Specifies the particular dialect to use. If set, overrides
153  the value of :attr:`IOProfile.dialect`
154  :type dialect: :class:`str`
155 
156  :param seqres: Whether to read SEQRES records. If set to True, the loaded
157  entity and seqres entry will be returned as a tuple.
158  If file doesnt contain SEQRES records, the returned
159  :class:`ost.seq.SequenceList` will be invalid.
160  :type seqres: :class:`bool`
161 
162  :param bond_feasibility_check: Flag for :attr:`IOProfile.processor`. If
163  turned on, atoms are only connected by
164  bonds if they are within a reasonable distance
165  (as defined by
166  :func:`ost.conop.IsBondFeasible`).
167  If set, overrides the value of
168  :attr:`ost.conop.Processor.check_bond_feasibility`
169  :type bond_feasibility_check: :class:`bool`
170  :param read_conect: By default, OpenStructure doesn't read CONECT statements in
171  a pdb file. Reason is that they're often missing and we prefer
172  to rely on the chemical component dictionary from the PDB.
173  However, there may be cases where you really want these CONECT
174  statements. For example novel compounds with no entry in
175  the chemical component dictionary. Setting this to True has
176  two effects: 1) CONECT statements are read and blindly applied
177  2) The processor does not connect any pair of HETATOM atoms in
178  order to not interfer with the CONECT statements.
179  :type read_conect: :class:`bool`
180 
181  :rtype: :class:`~ost.mol.EntityHandle` or a list thereof if `load_multi` is
182  True.
183 
184  :raises: :exc:`~ost.io.IOException` if the import fails due to an erroneous or
185  inexistent file
186  """
187  def _override(val1, val2):
188  if val2!=None:
189  return val2
190  else:
191  return val1
192  if isinstance(profile, str):
193  prof=profiles.Get(profile)
194  elif isinstance(profile, IOProfile):
195  prof=profile.Copy()
196  else:
197  raise TypeError('profile must be of type string or IOProfile, '+\
198  'instead of %s'%type(profile))
199  if dialect not in (None, 'PDB', 'CHARMM',):
200  raise ValueError('dialect must be PDB or CHARMM')
201  prof.calpha_only=_override(prof.calpha_only, calpha_only)
202  prof.no_hetatms=_override(prof.no_hetatms, no_hetatms)
203  prof.dialect=_override(prof.dialect, dialect)
204  prof.read_conect=_override(prof.read_conect, read_conect)
205  if prof.processor:
206  prof.processor.check_bond_feasibility=_override(prof.processor.check_bond_feasibility,
207  bond_feasibility_check)
208  prof.processor.connect_hetatm=_override(prof.processor.connect_hetatm,
209  not read_conect)
210  prof.fault_tolerant=_override(prof.fault_tolerant, fault_tolerant)
211  prof.join_spread_atom_records=_override(prof.join_spread_atom_records,
212  join_spread_atom_records)
213 
214  tmp_file = None # avoid getting out of scope
215  if remote:
216  if remote_repo not in ['pdb', 'smtl', 'pdb_redo']:
217  raise IOError("remote_repo must be in ['pdb', 'smtl', 'pdb_redo']")
218  from ost.io.remote import RemoteGet
219  tmp_file =RemoteGet(filename, from_repo=remote_repo)
220  filename = tmp_file.name
221 
222  conop_inst=conop.Conopology.Instance()
223  if prof.processor:
224  if prof.dialect=='PDB':
225  prof.processor.dialect=conop.PDB_DIALECT
226  elif prof.dialect=='CHARMM':
227  prof.processor.dialect=conop.CHARMM_DIALECT
228  reader=PDBReader(filename, prof)
229  reader.read_seqres=seqres
230  try:
231  if load_multi:
232  ent_list=[]
233  while reader.HasNext():
234  ent=mol.CreateEntity()
235  reader.Import(ent, restrict_chains)
236  if prof.processor:
237  prof.processor.Process(ent)
238  ent_list.append(ent)
239  if len(ent_list)==0:
240  raise IOError("File '%s' doesn't contain any entities" % filename)
241  return ent_list
242  else:
243  ent=mol.CreateEntity()
244  if reader.HasNext():
245  reader.Import(ent, restrict_chains)
246  if prof.processor:
247  prof.processor.Process(ent)
248  else:
249  raise IOError("File '%s' doesn't contain any entities" % filename)
250  if seqres:
251  return ent, reader.seqres
252  return ent
253  except:
254  raise
255 
256 def SavePDB(models, filename, dialect=None, pqr=False, profile='DEFAULT'):
257  """
258  Save entity or list of entities to disk. If a list of entities is supplied
259  the PDB file will be saved as a multi PDB file. Each of the entities is
260  wrapped into a MODEL/ENDMDL pair.
261 
262  If the atom number exceeds 99999, '*****' is used.
263 
264  :param models: The entity or list of entities (handles or views) to be saved
265  :param filename: The filename
266  :type filename: string
267  :raises: IOException if the restrictions of the PDB format are not satisfied
268  (with the exception of atom numbers, see above):
269 
270  * Chain names with more than one character
271  * Atom positions with coordinates outside range [-999.99, 9999.99]
272  * Residue names longer than three characters
273  * Atom names longer than four characters
274  * Numeric part of :class:`ost.mol.ResNum` outside range [-999, 9999]
275  * Alternative atom indicators longer than one character
276  """
277  if not getattr(models, '__len__', None):
278  models=[models]
279  if isinstance(profile, str):
280  profile=profiles.Get(profile)
281  elif isinstance(profile, IOProfile):
282  profile = profile.Copy()
283  else:
284  raise TypeError('profile must be of type string or IOProfile, '+\
285  'instead of %s'%type(profile))
286  profile.dialect=_override(profile.dialect, dialect)
287  writer=PDBWriter(filename, profile)
288  writer.SetIsPQR(pqr)
289  if len(models)>1:
290  writer.write_multi_model=True
291  for model in models:
292  writer.Write(model)
293 
294 try:
295  from ost import img
296  LoadMap = LoadImage
297  SaveMap = SaveImage
298 except ImportError:
299  pass
300 
301 
303 def LoadImageList (files):
304  image_list=img.ImageList()
305  for file in files:
306  image=LoadImage(file)
307  image_list.append(image)
308  return image_list
309 
310 LoadMapList=LoadImageList
311 
312 def LoadCHARMMTraj(crd, dcd_file=None, profile='CHARMM',
313  lazy_load=False, stride=1,
314  dialect=None, detect_swap=True,swap_bytes=False):
315  """
316  Load CHARMM trajectory file.
317 
318  :param crd: EntityHandle or filename of the (PDB) file containing the
319  structure. The structure must have the same number of atoms as the
320  trajectory
321  :param dcd_file: The filename of the DCD file. If not set, and crd is a
322  string, the filename is set to the <crd>.dcd
323  :param layz_load: Whether the trajectory should be loaded on demand. Instead
324  of loading the complete trajectory into memory, the trajectory frames are
325  loaded from disk when requested.
326  :param stride: The spacing of the frames to load. When set to 2, for example,
327  every second frame is loaded from the trajectory. By default, every frame
328  is loaded.
329  :param dialect: The dialect for the PDB file to use. See :func:`LoadPDB`. If
330  set, overrides the value of the profile
331  :param profile: The IO profile to use for loading the PDB file. See
332  :doc:`profile`.
333  :param detect_swap: if True (the default), then automatic detection of endianess
334  is attempted, otherwise the swap_bytes parameter is used
335  :param swap_bytes: is detect_swap is False, this flag determines whether bytes
336  are swapped upon loading or not
337  """
338  if not isinstance(crd, mol.EntityHandle):
339  if dcd_file==None:
340  dcd_file='%s.dcd' % os.path.splitext(crd)[0]
341  crd=LoadPDB(crd, profile=profile, dialect=dialect)
342 
343  else:
344  if not dcd_file:
345  raise ValueError("No DCD filename given")
346  return LoadCHARMMTraj_(crd, dcd_file, stride, lazy_load, detect_swap, swap_bytes)
347 
348 def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None,
349  profile='DEFAULT', remote=False, seqres=False, info=False):
350  """
351  Load a mmCIF file and return one or more entities. Several options allow to
352  customize the exact behaviour of the mmCIF import. For more information on
353  these options, see :doc:`profile`.
354 
355  Residues are flagged as ligand if they are not waters nor covered by an
356  ``entity_poly`` record (ie. they are non-polymer entities in
357  ``pdbx_entity_nonpoly``). Note that all residues except waters will be
358  flagged as ligands if ``seqres=False`` (the default).
359 
360  :param filename: File to be loaded
361  :type filename: :class:`str`
362 
363  :param fault_tolerant: Enable/disable fault-tolerant import. If set, overrides
364  the value of :attr:`IOProfile.fault_tolerant`.
365  :type fault_tolerant: :class:`bool`
366 
367  :param calpha_only: When set to true, forces the importer to only load atoms
368  named CA. If set, overrides the value of
369  :attr:`IOProfile.calpha_only`.
370  :type calpha_only: :class:`bool`
371 
372  :param profile: Aggregation of flags and algorithms to control import and
373  processing of molecular structures. Can either be a
374  :class:`str` specifying one of the default profiles
375  ['DEFAULT', 'SLOPPY', 'CHARMM', 'STRICT'] or an actual object
376  of type :class:`ost.io.IOProfile`. If a :class:`str` defines
377  a default profile, :attr:`IOProfile.processor` is set to
378  :class:`ost.conop.RuleBasedProcessor` with the currently
379  set :class:`ost.conop.CompoundLib` available as
380  :func:`ost.conop.GetDefaultLib()`. If no
381  :class:`ost.conop.CompoundLib` is available,
382  :class:`ost.conop.HeuristicProcessor` is used instead. See
383  :doc:`profile` for more info.
384  :type profile: :class:`str`/:class:`ost.io.IOProfile`
385 
386  :param remote: If set to True, the method tries to load the pdb from the
387  remote pdb repository www.pdb.org. The filename is then
388  interpreted as the pdb id.
389  :type remote: :class:`bool`
390 
391  :param seqres: Whether to return SEQRES records. If True, a
392  :class:`~ost.seq.SequenceList` object is returned as the second
393  item. The sequences in the list are named according to the
394  mmCIF chain name.
395  This feature requires a default
396  :class:`compound library <ost.conop.CompoundLib>`
397  to be defined and accessible via
398  :func:`~ost.conop.GetDefaultLib`. One letter codes of non
399  standard compounds are set to X otherwise.
400  :type seqres: :class:`bool`
401 
402  :param info: Whether to return an info container with the other output.
403  If True, a :class:`MMCifInfo` object is returned as last item.
404  :type info: :class:`bool`
405 
406  :rtype: :class:`~ost.mol.EntityHandle` (or tuple if *seqres* or *info* are
407  True).
408 
409  :raises: :exc:`~ost.io.IOException` if the import fails due to an erroneous
410  or non-existent file.
411  """
412  def _override(val1, val2):
413  if val2!=None:
414  return val2
415  else:
416  return val1
417  if isinstance(profile, str):
418  prof = profiles.Get(profile)
419  else:
420  prof = profile.Copy()
421 
422  prof.calpha_only=_override(prof.calpha_only, calpha_only)
423  prof.fault_tolerant=_override(prof.fault_tolerant, fault_tolerant)
424 
425  if remote:
426  from ost.io.remote import RemoteGet
427  tmp_file = RemoteGet(filename, from_repo='cif')
428  filename = tmp_file.name
429 
430  try:
431  ent = mol.CreateEntity()
432  reader = MMCifReader(filename, ent, prof)
433 
434  # NOTE: to speed up things, we could introduce a restrict_chains parameter
435  # similar to the one in LoadPDB. Here, it would have to be a list/set
436  # of chain-name-strings.
437 
438  #if reader.HasNext():
439  reader.Parse() # branch links are connected in here
440  if prof.processor:
441  prof.processor.Process(ent)
442  #else:
443  # raise IOError("File doesn't contain any entities")
444  if seqres and info:
445  return ent, reader.seqres, reader.info
446  if seqres:
447  return ent, reader.seqres
448  if info:
449  return ent, reader.info
450  return ent
451  except:
452  raise
453 
454 
455 def SaveMMCIF(ent, filename, compound_lib = conop.GetDefaultLib(),
456  data_name="OST_structure", mmcif_conform = True,
457  entity_info = MMCifWriterEntityList()):
458  """
459  Save OpenStructure entity in mmCIF format
460 
461  :param ent: OpenStructure Entity to be saved
462  :param filename: Filename - .gz suffix triggers gzip compression
463  :param compound_lib: Compound library required when writing, uses
464  :func:`ost.conop.GetDefaultLib` if not given
465  :param data_name: Name of data block that will be written to
466  mmCIF file. Typically, thats the PDB ID or some
467  identifier.
468  :param mmcif_conform: Controls processing of structure, i.e. identification
469  of mmCIF entities etc. before writing. Detailed
470  description in :ref:`MMCif writing`. In short:
471  If *mmcif_conform* is set to True, Chains in *ent* are
472  expected to be valid mmCIF entities with residue numbers
473  set according to underlying SEQRES. That should be the
474  case when *ent* has been loaded with :func:`LoadMMCIF`.
475  If *mmcif_conform* is set to False, heuristics kick in
476  to identify and separate mmCIF entities based on
477  :class:`ost.mol.ChemClass` of the residues in a chain.
478  :type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
479  :param entity_info: Advanced usage - description in :ref:`MMCif writing`
480  :type filename: :class:`str`
481  :type compound_lib: :class:`ost.conop.CompoundLib`
482  :type data_name: :class:`str`
483  :type mmcif_conform: :class:`bool`
484  :type entity_info: :class:`MMCifWriterEntityList`
485  """
486  if compound_lib is None:
487  raise RuntimeError("Require valid compound library to write mmCIF format")
488  writer = MMCifWriter()
489  writer.SetStructure(ent, compound_lib, mmcif_conform = mmcif_conform,
490  entity_info = entity_info)
491  writer.Write(data_name, filename)
492 
493 
494 
495 # this function uses a dirty trick: should be a member of MMCifInfoBioUnit
496 # which is totally C++, but we want the method in Python... so we define it
497 # here (__init__) and add it as a member to the class. With this, the first
498 # arguement is the usual 'self'.
499 # documentation for this function was moved to mmcif.rst,
500 # MMCifInfoBioUnit.PDBize, since this function is not included in SPHINX.
501 def _PDBize(biounit, asu, seqres=None, min_polymer_size=None,
502  transformation=False, peptide_min_size=10, nucleicacid_min_size=10,
503  saccharide_min_size=10):
504  if min_polymer_size is not None:
505  pdbizer = mol.alg.PDBize(min_polymer_size=min_polymer_size)
506  else:
507  pdbizer = mol.alg.PDBize(peptide_min_size=peptide_min_size,
508  nucleicacid_min_size=nucleicacid_min_size,
509  saccharide_min_size=saccharide_min_size)
510 
511  chains = biounit.GetChainList()
512  c_intvls = biounit.GetChainIntervalList()
513  o_intvls = biounit.GetOperationsIntervalList()
514  ss = seqres
515  if not ss:
516  ss = seq.CreateSequenceList()
517  # create list of operations
518  # for cartesian products, operations are stored in a list, multiplied with
519  # the next list of operations and re-stored... until all lists of operations
520  # are multiplied in an all-against-all manner.
521  operations = biounit.GetOperations()
522  for i in range(0,len(c_intvls)):
523  trans_matrices = geom.Mat4List()
524  l_operations = operations[o_intvls[i][0]:o_intvls[i][1]]
525  if len(l_operations) > 0:
526  for op in l_operations[0]:
527  rot = geom.Mat4()
528  rot.PasteRotation(op.rotation)
529  trans = geom.Mat4()
530  trans.PasteTranslation(op.translation)
531  tr = geom.Mat4()
532  tr = trans * rot
533  trans_matrices.append(tr)
534  for op_n in range(1, len(l_operations)):
535  tmp_ops = geom.Mat4List()
536  for o in l_operations[op_n]:
537  rot = geom.Mat4()
538  rot.PasteRotation(o.rotation)
539  trans = geom.Mat4()
540  trans.PasteTranslation(o.translation)
541  tr = geom.Mat4()
542  tr = trans * rot
543  for t_o in trans_matrices:
544  tp = t_o * tr
545  tmp_ops.append(tp)
546  trans_matrices = tmp_ops
547  # select chains into a view as basis for each transformation
548  assu = asu.Select('cname='+','.join(mol.QueryQuoteName(name) \
549  for name in \
550  chains[c_intvls[i][0]:c_intvls[i][1]]))
551  pdbizer.Add(assu, trans_matrices, ss)
552  pdb_bu = pdbizer.Finish(transformation)
553  if transformation:
554  return pdb_bu, pdb_bu.GetTransform().GetMatrix()
555  return pdb_bu
556 
557 MMCifInfoBioUnit.PDBize = _PDBize
Manages a collection of images.
Definition: image_list.hh:43
def __iter__(self)
Definition: __init__.py:71
def Get(self, key)
Definition: __init__.py:49
def __len__(self)
Definition: __init__.py:68
def __getitem__(self, key)
Definition: __init__.py:40
def __init__(self)
Definition: __init__.py:25
def __setitem__(self, key, value)
Definition: __init__.py:43
reader for the mmcif file format
Definition: mmcif_reader.hh:61
Protein or molecule.
std::vector< Mat4 > Mat4List
Definition: mat4.hh:141
def RemoteGet(id, from_repo='pdb')
Definition: remote.py:124
def SavePDB(models, filename, dialect=None, pqr=False, profile='DEFAULT')
Definition: __init__.py:256
def LoadPDB(filename, restrict_chains="", no_hetatms=None, fault_tolerant=None, load_multi=False, join_spread_atom_records=None, calpha_only=None, profile='DEFAULT', remote=False, remote_repo='pdb', dialect=None, seqres=False, bond_feasibility_check=None, read_conect=False)
Definition: __init__.py:87
def LoadImageList(files)
Definition: __init__.py:303
mol::CoordGroupHandle DLLEXPORT_OST_IO LoadCHARMMTraj(const mol::EntityHandle &ent, const String &trj_filename, unsigned int stride=1, bool lazy_load=false, bool detect_swap=true, bool byte_swap=false)
import a CHARMM trajectory in dcd format with an existing entity requires the existing entity and the...
def SaveMMCIF(ent, filename, compound_lib=conop.GetDefaultLib(), data_name="OST_structure", mmcif_conform=True, entity_info=MMCifWriterEntityList())
Definition: __init__.py:457
DLLEXPORT_OST_IO img::ImageHandle LoadImage(const boost::filesystem::path &loc)
Function that loads an image from a file.
def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None, profile='DEFAULT', remote=False, seqres=False, info=False)
Definition: __init__.py:349