19 #ifndef OST_CONOP_COMPOUND_HH
20 #define OST_CONOP_COMPOUND_HH
23 #include <boost/shared_ptr.hpp>
30 namespace ost {
namespace conop {
34 year(y), month(m), day(d)
37 year(1900), month(1), day(1)
39 bool operator<(
const Date& date)
const
41 return year<date.
year && month<date.
month && day<date.
day;
45 return year==date.
year && month==date.
month && day==date.
day;
55 std::vector<StringRef> parts=str.
split(
'-');
56 assert(parts.size()==3);
57 std::pair<bool, int> year=parts[0].to_int();
58 std::pair<bool, int> month=parts[1].to_int();
59 std::pair<bool, int> day=parts[2].to_int();
60 assert(year.first); assert(month.first); assert(day.first);
61 return Date(year.second, month.second, day.second);
73 : ordinal(0), is_leaving(false) {
93 : atom_one(0), atom_two(0), order(1) {
126 : olc_(
'?'), tlc_(id), chem_class_(), chem_type_(), dialect_(
Compound::PDB){
165 chem_class_=chem_class;
173 chem_type_=chem_type;
185 return chem_class_.IsPeptideLinking();
189 return chem_class_.IsNucleotideLinking();
193 atom_specs_.push_back(atom);
197 bond_specs_.push_back(bond);
204 int GetAtomSpecIndex(
const String& name)
const;
217 const Date& GetModificationDate()
const
221 const Date& GetCreationDate()
const
223 return creation_date_;
226 void SetModificationDate(
const Date& mod_date)
231 void SetCreationDate(
const Date& creation_date)
233 creation_date_=creation_date;