You are reading the documentation for version 1.3 of OpenStructure. You may also want to read the documentation for:
1.1
1.2
1.4
1.5
1.6
1.7
1.7.1
1.8
1.9
1.10
1.11
2.0
2.1
2.2
devel
io - Input and Output of Sequences, Structures and Maps¶The io module deals with input and output of entities, alignments, sequences, images. Importers for common file formats containing molecules such as PDB, SDF and CHARMM trajectory files are available. Sequence and alignment file formats such as FASTA and CLUSTALW are supported as well as various image data (e.g. png, dm3) and density map files (e.g. CCP4, MRC). Molecular Structures¶Loading Molecular Structures¶The io modules offers several ways to load molecular structures depending on your requirements. The most general way is offered by LoadEntity(), which will automatically detect the file format based on the file extension.
Some of the formats have a dedicated function that allows you to tweak many parameters that affect the import. PDB files can be loaded with LoadPDB(). It offers a tighter control over the exact loading behaviour. IO Profiles for entity importer
Saving Molecular Structures¶Saving a complete entity or a view is a matter of calling SaveEntity(). ent=io.LoadEntity('protein.pdb')
# save full entity
io.SaveEntity(ent, 'full.pdb')
# only save C-alpha atoms
io.SaveEntity(ent.Select('aname=CA and peptide=true'), 'calpha.pdb')
SavePDB() provides a simple way to save several entities into one file: ent=io.LoadEntity('protein.pdb')
# Save complete entity
io.SavePDB(ent, 'full.pdb')
# Save chain A and chain B separately
io.SavePDB([ent.Select('cname=A'), ent.Select('cname=B')], 'split.pdb')
Sequences and Alignments¶Loading sequence or alignment files¶
Saving Sequence Data¶
Density Maps¶Loading Density Maps¶
Saving Density Maps¶
|
ContentsSearchEnter search terms or a module, class or function name. Previous topicclustalw - Perform multiple sequence alignment Next topicSupported Structure File Formats You are here
|