Examples
Examples of how to use the Python layer of the FormatConverter
In the python/ccpnmr/format/examples/ directory you can find some example Python scripts that show you how to use the FormatConverter without having to access the GUI layer. This is very useful if you have to repeat an import/export many times - it allows you to automate the process.
The example scripts are:
- convertCns2Pdb.py: Shows how to convert CNS-type coordinate files to PDB-like coordinate files with the correct PDB atom naming. Also resets the path names. Level: intermediate
- convertNmrView2XEasy.py: Shows how to convert NmrView to XEasy files via the data model using the FormatConverter Python layer. Level: intermediate
- importCnsConstraints.py:Shows how to import a CNS constraint file into the data model by directly using the FormatConverter Python layer. Level: basic
- importSequenceFile.py:Shows how to import a Fasta sequence file into the data model by directly using the FormatConverter Python layer. Level: basic
Note that example scripts on how to use the (lowest level) Python API itself are also available in the python/ccp/examples directory.