| #ifndef CHEM_LIB
|
| #define CHEM_LIB
|
|
|
| #include <vector>
|
| #include <string>
|
| #include <iostream>
|
| #include <fstream>
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| class ChemEntry {
|
| public:
|
|
|
|
|
| bool isSameEntry(const std::string residueName, const std::string atomName) const;
|
|
|
|
|
| float getEntryRadius() const { return radius_; }
|
|
|
|
|
| float getEntryCharge() const { return charge_; }
|
|
|
|
|
| int getEntryChemType() const { return chemType_; }
|
|
|
|
|
| friend std::istream& operator>>(std::istream& s, ChemEntry &entry) {
|
| return s >> entry.residueName_ >> entry.atomName_ >> entry.radius_ >> entry.charge_ >> entry.chemType_;
|
| }
|
|
|
|
|
| friend std::ostream& operator<<(std::ostream& s, const ChemEntry &entry) {
|
| s << entry.residueName_ << ' ' << entry.atomName_ << ' '
|
| << entry.radius_ << ' ' << entry.charge_ << ' ' << entry.chemType_;
|
| return s;
|
| }
|
|
|
| public:
|
| std::string residueName_;
|
| std::string atomName_;
|
| float radius_;
|
| float charge_;
|
| int chemType_;
|
| };
|
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| class ChemLib {
|
| public:
|
|
|
|
|
|
|
| ChemLib(const std::string libFileName);
|
| void loadLibrary(const std::string libFileName);
|
|
|
|
|
|
|
|
|
| float getAtomRadius(const char* residueName, const char* atomPDBType) const;
|
|
|
|
|
| float getAtomCharge(const char* residueName, const char* atomPDBType) const;
|
|
|
|
|
| int getAtomChemType(const char* residueName, const char* atomPDBType) const;
|
|
|
|
|
| void printLibrary(std::ostream& outFile) const;
|
|
|
|
|
| const ChemEntry* getLibEntry(const char* residueName, const char* atomPDBType) const;
|
|
|
| private:
|
| const ChemEntry* searchLibEntry(const std::string residueName, const std::string atomName) const;
|
|
|
| private:
|
| std::vector<ChemEntry> libVector;
|
| };
|
|
|
| #endif
|
|
|