1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
|
class NMRStarFile
{
%TypeHeaderCode
#include <BALL/FORMAT/NMRStarFile.h>
%End
public:
static const float FLOAT_VALUE_NA;
static const int INT_VALUE_NA;
static const int POSITION_VALUE_NA;
class SampleCondition
{
public:
SampleCondition();
bool hasType(String );
String name;
vector<String> types;
StringHashMap<float> values;
StringHashMap<float> errors;
StringHashMap<String> units;
};
class Sample
{
public:
class Component
{
public:
Component();
String label;
float concentration_value;
String value_unit;
float concentration_min;
float concentration_max;
String isotopic_labeling;
};
Sample();
String label;
String type;
String details;
};
class ShiftReferenceElement
{
public:
ShiftReferenceElement();
String mol_common_name;
String atom_type;
Position isotope_number;
String atom_group;
String shift_units;
float shift_value;
String reference_method;
String reference_type;
float indirect_shift_ratio;
};
class ShiftReferenceSet
{
public:
ShiftReferenceSet();
String name;
};
class NMRAtomData
{
public:
NMRAtomData();
Position atom_ID;
Position residue_seq_code;
String residue_label;
String atom_name;
char atom_type;
float shift_value;
float error_value;
Position ambiguity_code;
};
class NMRAtomDataSet
{
public:
NMRAtomDataSet(NMRStarFile* parent);
String name;
String condition;
String reference;
vector<String> samples;
};
class EntryInformation
{
public:
EntryInformation();
~EntryInformation();
void clear();
String entry_type;
String BMRB_accession_code;
String NMR_STAR_version;
String experimental_method;
String submission_date;
};
class MonomericPolymer
{
public:
class HomologDB
{
public:
HomologDB();
void clear();
String name;
String accession_code;
String entry_mol_name;
float seq_to_submitted_percentage;
float subject_length;
float seq_identity;
float seq_positive;
float homology_expectation_value;
};
MonomericPolymer();
void clear();
String label_name;
String type;
String polymer_class;
String common_name;
String name_variant;
float molecular_mass;
String details;
int number_of_residues;
String residue_sequence;
StringHashMap<String> residues_by_index;
};
class MolecularSystem
{
public:
class RelatedDB
{
public:
RelatedDB();
void clear();
String name;
String accession_code;
String entry_mol_name;
String relation_type;
String details;
};
class ChemicalUnit
{
public:
ChemicalUnit();
void clear();
String component_name;
String label;
};
MolecularSystem();
~MolecularSystem();
ChemicalUnit& getChemicalUnit(Position i);
Size getNumberOfChemicalUnits();
void clear();
String system_name;
String abbreviation_common;
String system_physical_state;
String system_oligomer_state;
String system_paramagnetic;
String system_thiol_state;
float system_molecular_weight;
};
class NMRSpectrometer
{
public:
NMRSpectrometer();
String manufacturer;
String model;
float field_strength;
};
class BALLToBMRBMapper
{
%TypeHeaderCode
#include <BALL/KERNEL/chain.h>
using BMRBIndex = std::pair<Position, Position>;
using BALLToBMRBMapping = std::map<Atom* const, BMRBIndex>;
using BMRBToBALLMapping = std::map<const NMRStarFile::NMRAtomData*, Atom* const>;
%End
public:
BALLToBMRBMapper();
BALLToBMRBMapper(const Chain& , const NMRStarFile&, const String&);
virtual ~BALLToBMRBMapper();
const Chain* getChain() const;
void setChain(const Chain&);
void setNMRStarFile(const NMRStarFile&);
const NMRStarFile* getNMRStarFile() const;
bool setNMRAtomDataSetByName(const String& );
int getNumberOfMismatches();
int getNumberOfGaps();
bool isMapped(const NMRStarFile::NMRAtomData&) const;
const Atom* getBALLAtom(const NMRStarFile::NMRAtomData&) const;
bool isMapped(const Atom*) const;
pair<Position, Position> operator () (Atom*);
bool createTrivialMapping();
bool createMapping(const String&, const String&);
void clear();
};
NMRStarFile();
NMRStarFile(const String&_name, OpenMode)
throw(FileNotFound);
~NMRStarFile();
bool read();
void close();
bool assignShifts(BALLToBMRBMapper&);
bool assignShifts(AtomContainer&, const String&, const String&, const String&);
Size getNumberOfAtoms() const;
Size getNumberOfShiftsAssigned();
const EntryInformation& getEntryInformation() const;
MolecularSystem& getMolecularInformation();
MolecularSystem::ChemicalUnit& getChemicalUnitByLabel(const String& );
bool hasSampleCondition(String );
SampleCondition& getSampleConditionByName(String );
SampleCondition& getSampleCondition(Position );
const Size getNumberOfSampleConditions() const;
Size getNumberOfSamples() const;
bool hasSample(String label) const;
Sample getSample(Index ) const;
Sample getSample(String ) const;
Size getNumberOfShiftReferenceSets() const;
bool hasShiftReferenceSet(String );
ShiftReferenceSet& getShiftReferenceSet(Position );
ShiftReferenceSet& getShiftReferenceSetByName(String );
Size getNumberOfNMRSpectrometers() const;
NMRStarFile::NMRSpectrometer& getNMRSpectrometer(Position );
NMRSpectrometer& getNMRSpectrometerByName(String );
String getNMRSpectrometerManufacturer(Position );
float getNMRSpectrometerFieldStrength(Position );
Size getNumberOfMonomericPolymers() const;
MonomericPolymer getMonomericPolymer(Position);
MonomericPolymer getMonomericPolymer(String name);
bool hasMonomericPolymer(String name) const;
bool isMonomericPolymer(String );
void addMonomericPolymer(MonomericPolymer );
String getResidueSequence(Position i) const;
bool hasHshifts();
bool hasCshifts();
bool hasNshifts();
bool operator == (const NMRStarFile& ) const;
bool operator != (const NMRStarFile& ) const;
void clear();
private:
NMRStarFile(const NMRStarFile& f);
};
|