Loading...
Searching...
No Matches
BALL::CCP4File Class Reference
Molecular Modeling » File Formats

`#include <BALL/FORMAT/CCP4File.h>`

Inheritance diagram for BALL::CCP4File:

## Public Member Functions

Constructors and Destructor
| CCP4File ()
| Default constructor.
| CCP4File (const String &name, File::OpenMode open_mode=std::ios::in)
virtual | ~CCP4File ()
| Destructor.
Assignment
virtual void | clear ()
| Clear method.
Predicates
bool | operator== (const CCP4File &file) const
| Equality operator.
Public methods for file handling
virtual bool | open (const String &name, File::OpenMode open_mode=std::ios::in)
virtual bool | readHeader ()
virtual bool | readSymmetryRecords ()
virtual bool | read (RegularData3D &map)
virtual bool | writeHeader ()
virtual bool | write (RegularData3D &map)
Public Member Functions inherited from BALL::File
| File ()
| File (const String &name, OpenMode open_mode=std::ios::in)
virtual | ~File ()
bool | isValid () const
bool | open (const String &name, File::OpenMode open_mode=std::ios::in)
bool | reopen ()
bool | reopen (File::OpenMode open_mode)
void | close ()
const String & | getName () const
void | setName (const String &name)
const String & | getOriginalName () const
Size | getSize ()
File::OpenMode | getOpenMode () const
Type | getType (bool trace_link) const
bool | copyTo (const String &destination_name, Size buffer_size=4096)
bool | moveTo (const String &destination_name)
bool | remove ()
bool | renameTo (const String &new_path)
bool | truncate (Size size=0)
std::fstream & | getFileStream ()
TransformationManager & | getTransformationManager ()
const TransformationManager & | getTransformationManager () const
bool | operator== (const File &file) const
bool | operator!= (const File &file) const
bool | isOpen () const
bool | isClosed () const
bool | isAccessible () const
bool | isCanonized () const
bool | isReadable () const
bool | isWritable () const
bool | isExecutable () const

## Accessors

bool | swap_bytes_
| flag indicating that we have to swap bytes when reading header values
Distance | offset_symops_
| number of bytes used for storing symmetry operations
Size | col_axis_
| how do columns, rows and sections correspond to specific axes: 0=x, 1=y, 2=z
Size | row_axis_
Size | sec_axis_
Vector3 | start_
| the start coordinates in grid coordinates, i.e. indices
Vector3 | extent_
| the extent of the map
Vector3 | sampling_rate_
| the sampling rates used for the map
Vector3 | cell_dimension_
| dimension of the crystal unit cell in Angstrom/sample
Angle | alpha_
| angles of the crystal unit cell
Angle | beta_
Angle | gamma_
float | mean_density_
| mean density value
float | deviation_sigma_
| rms deviation of whole map from mean density value
Index | space_group_
| space group number
Vector3 | origin_
| geometry in cartesian coordinates
Vector3 | xaxis_
Vector3 | yaxis_
Vector3 | zaxis_
int | readBinValueasInt_ (char *header, Position pos)
float | readBinValueasFloat_ (char *header, Position pos)

## Additional Inherited Members

Public Types inherited from BALL::File
typedef std::ios::openmode | OpenMode
enum | Transformation { TRANSFORMATION__EXEC = 1 , TRANSFORMATION__FILTER = 2 , TRANSFORMATION__URL = 3 }
enum | Type { TYPE__UNKNOWN = 0 , TYPE__DIRECTORY = 1 , TYPE__CHAR_SPECIAL_FILE = 2 , TYPE__BLOCK_SPECIAL_FILE = 3 , TYPE__REGULAR_FILE = 4 , TYPE__SYMBOLIC_LINK = 5 , TYPE__SOCKET = 6 , TYPE__FIFO_SPECIAL_FILE = 7 }
static Size | getSize (String name)
static Type | getType (String name, bool trace_link)
static bool | copy (String source_name, String destination_name, Size buffer_size=4096)
static bool | move (const String &source_name, const String &destination_name)
static bool | remove (String name)
static bool | rename (String old_path, String new_path)
static bool | truncate (String path, Size size=0)
static bool | createTemporaryFilename (String &temporary, const String &suffix=".TMP")
static void | enableTransformation (Transformation transformation)
static void | disableTransformation (Transformation transformation)
static bool | isTransformationEnabled (Transformation transformation)
static void | registerTransformation (const String &pattern, const String &exec)
static void | unregisterTransformation (const String &pattern)
static bool | isAccessible (String name)
static bool | isReadable (String name)
static bool | isWritable (String name)
static bool | isExecutable (String name)
Static Public Attributes inherited from BALL::File
static const OpenMode | MODE_IN
| Open for input (default).
static const OpenMode | MODE_OUT
| Open for output.
static const OpenMode | MODE_APP
| Append. Seek to end before each write operation.
static const OpenMode | MODE_BINARY
| Binary mode.
static const OpenMode | MODE_ATE
| Seek to end directly after opening.
static const OpenMode | MODE_TRUNC
| Truncate an existing file.
static const String | TRANSFORMATION_EXEC_PREFIX
| Prefix for filenames that are created through the execution of commands "exec:".
static const String | TRANSFORMATION_FILE_PREFIX
| Prefix for files (to mimick URL-like behavior) "file:".
static const String | TRANSFORMATION_FTP_PREFIX
| Prefix for FTP-transfers "ftp://".
static const String | TRANSFORMATION_HTTP_PREFIX
| Prefix for HTTP-transfer "http://".
String | name_
String | original_name_
OpenMode | open_mode_
bool | is_open_
bool | is_temporary_
static HashSet< String > | created_temp_filenames_
static TransformationManager | transformation_manager_
static Size | transformation_methods_

## Detailed Description

CCP4 density map file format. This class enables BALL to read and write CCP4 - type binary electron density maps as used by the CCP4 project For detailed information on the file format CCP4 see: http://www.ccp4.ac.uk/html/maplib.html#introduction

Definition at line 26 of file CCP4File.h.

## Constructor & Destructor Documentation

## CCP4File() [1/2]

BALL::CCP4File::CCP4File | ( |  | ) |

Default constructor.

## CCP4File() [2/2]

BALL::CCP4File::CCP4File | ( | const String & | name,
|  | File::OpenMode | open_mode = std::ios::in )

Detailed constructor

Exceptions

  Exception::FileNotFound | if the file could not be opened

## ~CCP4File()

virtual BALL::CCP4File::~CCP4File | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## clear()

virtual void BALL::CCP4File::clear | ( |  | ) |

virtual

Clear method.

Reimplemented from BALL::File.

## open()

virtual bool BALL::CCP4File::open | ( | const String & | name,
|  | File::OpenMode | open_mode = std::ios::in )

virtual

open a CCP4File

Exceptions

  Exception::FileNotFound | if the file could not be opened

## operator==()

bool BALL::CCP4File::operator== | ( | const CCP4File & | file | ) | const

Equality operator.

## read()

virtual bool BALL::CCP4File::read | ( | RegularData3D & | map | ) |

virtual

Read the file into a RegularData3D field.

## readBinValueasFloat_()

float BALL::CCP4File::readBinValueasFloat_ | ( | char * | header,
|  | Position | pos )

protected

## readBinValueasInt_()

int BALL::CCP4File::readBinValueasInt_ | ( | char * | header,
|  | Position | pos )

protected

## readHeader()

virtual bool BALL::CCP4File::readHeader | ( |  | ) |

virtual

Read the header of an existing file. Return true if the header could be read successfully, false ow.

## readSymmetryRecords()

virtual bool BALL::CCP4File::readSymmetryRecords | ( |  | ) |

virtual

Read the symmetry records of an existing file if present. Return true if the symmetry records could be read successfully, false ow.

## write()

virtual bool BALL::CCP4File::write | ( | RegularData3D & | map | ) |

virtual

Write a RegularData3D to a CCP4 File Return true if the map could be written successfully, false ow.

## writeHeader()

virtual bool BALL::CCP4File::writeHeader | ( |  | ) |

virtual

Write a header Return true if the header could be written successfully, false ow.

## Member Data Documentation

## alpha_

Angle BALL::CCP4File::alpha_

protected

angles of the crystal unit cell

Definition at line 136 of file CCP4File.h.

## beta_

Angle BALL::CCP4File::beta_

protected

Definition at line 136 of file CCP4File.h.

## cell_dimension_

Vector3 BALL::CCP4File::cell_dimension_

protected

dimension of the crystal unit cell in Angstrom/sample

Definition at line 133 of file CCP4File.h.

## col_axis_

Size BALL::CCP4File::col_axis_

protected

how do columns, rows and sections correspond to specific axes: 0=x, 1=y, 2=z

Definition at line 119 of file CCP4File.h.

## deviation_sigma_

float BALL::CCP4File::deviation_sigma_

protected

rms deviation of whole map from mean density value

Definition at line 142 of file CCP4File.h.

## extent_

Vector3 BALL::CCP4File::extent_

protected

the extent of the map

Definition at line 127 of file CCP4File.h.

## gamma_

Angle BALL::CCP4File::gamma_

protected

Definition at line 136 of file CCP4File.h.

## mean_density_

float BALL::CCP4File::mean_density_

protected

mean density value

Definition at line 139 of file CCP4File.h.

## offset_symops_

Distance BALL::CCP4File::offset_symops_

protected

number of bytes used for storing symmetry operations

Definition at line 116 of file CCP4File.h.

## origin_

Vector3 BALL::CCP4File::origin_

protected

geometry in cartesian coordinates

Definition at line 148 of file CCP4File.h.

## row_axis_

Size BALL::CCP4File::row_axis_

protected

Definition at line 120 of file CCP4File.h.

## sampling_rate_

Vector3 BALL::CCP4File::sampling_rate_

protected

the sampling rates used for the map

Definition at line 130 of file CCP4File.h.

## sec_axis_

Size BALL::CCP4File::sec_axis_

protected

Definition at line 121 of file CCP4File.h.

## space_group_

Index BALL::CCP4File::space_group_

protected

space group number

Definition at line 145 of file CCP4File.h.

## start_

Vector3 BALL::CCP4File::start_

protected

the start coordinates in grid coordinates, i.e. indices

Definition at line 124 of file CCP4File.h.

## swap_bytes_

bool BALL::CCP4File::swap_bytes_

protected

flag indicating that we have to swap bytes when reading header values

Definition at line 113 of file CCP4File.h.

## xaxis_

Vector3 BALL::CCP4File::xaxis_

protected

Definition at line 148 of file CCP4File.h.

## yaxis_

Vector3 BALL::CCP4File::yaxis_

protected

Definition at line 148 of file CCP4File.h.

## zaxis_

Vector3 BALL::CCP4File::zaxis_

protected

Definition at line 148 of file CCP4File.h.