Writing structures to a PDB file.
file: The name of the PDB file.
dir: The directory where the file is located.
model_num: Restrict the writing of structural data to a single model in the PDB file.
compress_type: The type of compression to use when creating the file.
force: A flag which if set to True will cause any pre-existing files to be overwritten.
This will write all of the structural data loaded in the current data pipe to be converted to the PDB format and written to file. Specifying the model number allows single models to be output.
The default behaviour of this function is to not compress the file. The compression can, however, be changed to either bzip2 or gzip compression. If the `.bz2' or `.gz' extension is not included in the file name, it will be added. This behaviour is controlled by the compression type which can be set to
To write all models and molecules to the PDB file `ensemble.pdb' within the directory `˜/pdb', type one of:
[numbers=none] relax> structure.write_pdb('ensemble.pdb', '~/pdb')
[numbers=none] relax> structure.write_pdb(file='ensemble.pdb', dir='pdb')
To write model number 3 into the new file `test.pdb', use one of:
[numbers=none] relax> structure.write_pdb('test.pdb', model_num=3)
[numbers=none] relax> structure.write_pdb(file='test.pdb', model_num=3)