ccp4srs  Version 1.0.0
ccp4srs_smiles.h
Go to the documentation of this file.
1 // $Id: ccp4srs_smiles.h $
2 // =================================================================
3 //
4 // CCP4 SRS Library: Storage, Retrieval and Search support for
5 // CCP4 ligand data.
6 //
7 // Copyright (C) Eugene Krissinel 2010-2013.
8 //
9 // This library is free software: you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License version 3, modified in accordance with the provisions
12 // of the license to address the requirements of UK law.
13 //
14 // You should have received a copy of the modified GNU Lesser
15 // General Public License along with this library. If not, copies
16 // may be downloaded from http://www.ccp4.ac.uk/ccp4license.php
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // =================================================================
24 //
25 // 12.04.14 <-- Date of Last Modification.
26 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 // -----------------------------------------------------------------
28 //
29 // **** Module : ccp4srs_smiles <interface>
30 // ~~~~~~~~~
31 // **** Classes : ccp4srs::Smiles - atom description class
32 // ~~~~~~~~~
33 //
34 // (C) E. Krissinel 2010-2014
35 //
36 // =================================================================
37 //
38 
39 #ifndef CCP4SRS_SMILES_H
40 #define CCP4SRS_SMILES_H
41 
42 #include "memio_.h"
43 
44 #include "mmdb2/mmdb_mattype.h"
45 #include "mmdb2/mmdb_mmcif_.h"
46 
47 namespace ccp4srs {
48 
49  DefineClass(Smiles);
50 
51  class Smiles {
52 
53  public:
54 
55  Smiles();
56  virtual ~Smiles();
57 
58  void freeSmiles();
59 
60  int readFromCIF_rcsb ( mmdb::mmcif::PLoop mmCIFLoop,
61  mmdb::cpstr program );
62 
63  bool isEmpty();
64 
65  inline mmdb::cpstr getVersion () { return ver; }
66  inline mmdb::cpstr getSmiles () { return plain; }
67  inline mmdb::cpstr getCanonical() { return canonical; }
68  inline mmdb::cpstr getInChI () { return plain; }
69  inline mmdb::cpstr getInChIKey () { return canonical; }
70 
71  void copy ( PSmiles smiles );
72 
73 /*
74  static void makeCIFTags ( mmdb::mmcif::PLoop mmCIFLoop );
75  int readFromCIF_ccp4 ( mmdb::mmcif::PLoop mmCIFLoop, int bondNo,
76  Container<Atom> & atoms );
77  int readFromCIF_rcsb ( mmdb::mmcif::PLoop mmCIFLoop, int bondNo,
78  Container<Atom> & atoms );
79  int readFromCIF ( mmdb::mmcif::PStruct mmCIFStruct,
80  Container<Atom> & atoms );
81  void writeToCIF ( mmdb::mmcif::PLoop mmCIFLoop, mmdb::cpstr monID,
82  Container<Atom> & atoms );
83 
84  bool compare ( Container<Atom> & atoms, PBond bond,
85  Container<Atom> & bond_atoms );
86 
87  bool copy ( Container<Atom> & atoms, PBond bond,
88  Container<Atom> & bond_atoms );
89 */
90 
91  void write_mem ( PMemIO memIO, int version );
92  bool read_mem ( PMemIO memIO, int version,
93  bool * Ok = NULL );
94 
95  protected:
96  mmdb::pstr ver;
97  mmdb::pstr plain;
98  mmdb::pstr canonical;
99 
100  };
101 
102 } // namespace ccp4srs
103 
104 #endif // CCP4SRS_SMILES_H
DefineClass(Angle)
void write_mem(PMemIO memIO, int version)
Definition: ccp4srs_smiles.cpp:65
int readFromCIF_rcsb(mmdb::mmcif::PLoop mmCIFLoop, mmdb::cpstr program)
Definition: ccp4srs_smiles.cpp:87
mmdb::cpstr getInChIKey()
Definition: ccp4srs_smiles.h:69
bool read_mem(PMemIO memIO, int version, bool *Ok=NULL)
Definition: ccp4srs_smiles.cpp:72
mmdb::cpstr getSmiles()
Definition: ccp4srs_smiles.h:66
Definition: ccp4srs_smiles.h:51
mmdb::pstr plain
plain smiles
Definition: ccp4srs_smiles.h:97
mmdb::cpstr getVersion()
Definition: ccp4srs_smiles.h:65
bool isEmpty()
Definition: ccp4srs_smiles.cpp:122
mmdb::cpstr getInChI()
Definition: ccp4srs_smiles.h:68
mmdb::pstr canonical
canonical smiles
Definition: ccp4srs_smiles.h:98
void copy(PSmiles smiles)
Definition: ccp4srs_smiles.cpp:116
virtual ~Smiles()
Definition: ccp4srs_smiles.cpp:52
Definition: ccp4srs_angle.cpp:42
Smiles()
Definition: ccp4srs_smiles.cpp:46
void freeSmiles()
Definition: ccp4srs_smiles.cpp:56
mmdb::pstr ver
software version
Definition: ccp4srs_smiles.h:96
mmdb::cpstr getCanonical()
Definition: ccp4srs_smiles.h:67