BALL
1.4.79
|
#include <BALL/FORMAT/CCP4File.h>
Public Member Functions | |
Constructors and Destructor | |
CCP4File () | |
Default constructor. More... | |
CCP4File (const String &name, File::OpenMode open_mode=std::ios::in) | |
virtual | ~CCP4File () |
Destructor. More... | |
Assignment | |
virtual void | clear () |
Clear method. More... | |
Predicates | |
bool | operator== (const CCP4File &file) const |
Equality operator. More... | |
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 |
Protected Member Functions | |
int | readBinValueasInt_ (char *header, Position pos) |
float | readBinValueasFloat_ (char *header, Position pos) |
Protected Attributes | |
bool | swap_bytes_ |
flag indicating that we have to swap bytes when reading header values More... | |
Distance | offset_symops_ |
number of bytes used for storing symmetry operations More... | |
Size | col_axis_ |
how do columns, rows and sections correspond to specific axes: 0=x, 1=y, 2=z More... | |
Size | row_axis_ |
Size | sec_axis_ |
Vector3 | start_ |
the start coordinates in grid coordinates, i.e. indices More... | |
Vector3 | extent_ |
the extent of the map More... | |
Vector3 | sampling_rate_ |
the sampling rates used for the map More... | |
Vector3 | cell_dimension_ |
dimension of the crystal unit cell in Angstrom/sample More... | |
Angle | alpha_ |
angles of the crystal unit cell More... | |
Angle | beta_ |
Angle | gamma_ |
float | mean_density_ |
mean density value More... | |
float | deviation_sigma_ |
rms deviation of whole map from mean density value More... | |
Index | space_group_ |
space group number More... | |
Vector3 | origin_ |
geometry in cartesian coordinates More... | |
Vector3 | xaxis_ |
Vector3 | yaxis_ |
Vector3 | zaxis_ |
Protected Attributes inherited from BALL::File | |
String | name_ |
String | original_name_ |
OpenMode | open_mode_ |
bool | is_open_ |
bool | is_temporary_ |
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 Public Member Functions inherited from BALL::File | |
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) More... | |
static const OpenMode | MODE_OUT |
Open for output. More... | |
static const OpenMode | MODE_APP |
Append. Seek to end before each write operation. More... | |
static const OpenMode | MODE_BINARY |
Binary mode. More... | |
static const OpenMode | MODE_ATE |
Seek to end directly after opening. More... | |
static const OpenMode | MODE_TRUNC |
Truncate an existing file. More... | |
static const String | TRANSFORMATION_EXEC_PREFIX |
Prefix for filenames that are created through the execution of commands "exec:". More... | |
static const String | TRANSFORMATION_FILE_PREFIX |
Prefix for files (to mimick URL-like behavior) "file:". More... | |
static const String | TRANSFORMATION_FTP_PREFIX |
Prefix for FTP-transfers "ftp://". More... | |
static const String | TRANSFORMATION_HTTP_PREFIX |
Prefix for HTTP-transfer "http://". More... | |
Static Protected Attributes inherited from BALL::File | |
static HashSet< String > | created_temp_filenames_ |
static TransformationManager | transformation_manager_ |
static Size | transformation_methods_ |
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.
BALL::CCP4File::CCP4File | ( | ) |
Default constructor.
BALL::CCP4File::CCP4File | ( | const String & | name, |
File::OpenMode | open_mode = std::ios::in |
||
) |
Detailed constructor
Exception::FileNotFound | if the file could not be opened |
|
virtual |
Destructor.
|
virtual |
Clear method.
Reimplemented from BALL::File.
|
virtual |
open a CCP4File
Exception::FileNotFound | if the file could not be opened |
|
virtual |
Read the file into a RegularData3D field.
|
protected |
|
virtual |
Read the header of an existing file. Return true if the header could be read successfully, false ow.
|
virtual |
Read the symmetry records of an existing file if present. Return true if the symmetry records could be read successfully, false ow.
|
virtual |
Write a RegularData3D to a CCP4 File Return true if the map could be written successfully, false ow.
|
virtual |
Write a header Return true if the header could be written successfully, false ow.
|
protected |
angles of the crystal unit cell
Definition at line 136 of file CCP4File.h.
|
protected |
Definition at line 136 of file CCP4File.h.
|
protected |
dimension of the crystal unit cell in Angstrom/sample
Definition at line 133 of file CCP4File.h.
|
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.
|
protected |
rms deviation of whole map from mean density value
Definition at line 142 of file CCP4File.h.
|
protected |
the extent of the map
Definition at line 127 of file CCP4File.h.
|
protected |
Definition at line 136 of file CCP4File.h.
|
protected |
mean density value
Definition at line 139 of file CCP4File.h.
|
protected |
number of bytes used for storing symmetry operations
Definition at line 116 of file CCP4File.h.
|
protected |
geometry in cartesian coordinates
Definition at line 148 of file CCP4File.h.
|
protected |
Definition at line 120 of file CCP4File.h.
|
protected |
the sampling rates used for the map
Definition at line 130 of file CCP4File.h.
|
protected |
Definition at line 121 of file CCP4File.h.
|
protected |
space group number
Definition at line 145 of file CCP4File.h.
|
protected |
the start coordinates in grid coordinates, i.e. indices
Definition at line 124 of file CCP4File.h.
|
protected |
flag indicating that we have to swap bytes when reading header values
Definition at line 113 of file CCP4File.h.
|
protected |
Definition at line 148 of file CCP4File.h.
|
protected |
Definition at line 148 of file CCP4File.h.
|
protected |
Definition at line 148 of file CCP4File.h.