30 class ResidueConst:
public Decorator {
31 friend class ResidueFactory;
39residue_index_(residue_index),
40residue_type_(residue_type) {
44 Int get_residue_index()
const {
46 return get_node().get_value(residue_index_);
47 } RMF_DECORATOR_CATCH( );
49 Int get_frame_residue_index()
const {
51 return get_node().get_frame_value(residue_index_);
52 } RMF_DECORATOR_CATCH( );
54 Int get_static_residue_index()
const {
56 return get_node().get_static_value(residue_index_);
57 } RMF_DECORATOR_CATCH( );
61 String get_residue_type()
const {
63 return get_node().get_value(residue_type_);
64 } RMF_DECORATOR_CATCH( );
66 String get_frame_residue_type()
const {
68 return get_node().get_frame_value(residue_type_);
69 } RMF_DECORATOR_CATCH( );
71 String get_static_residue_type()
const {
73 return get_node().get_static_value(residue_type_);
74 } RMF_DECORATOR_CATCH( );
77 static std::string get_decorator_type_name() {
78 return "ResidueConst";
80 RMF_SHOWABLE(ResidueConst,
"Residue: " << get_node());
84 class Residue:
public ResidueConst {
85 friend class ResidueFactory;
89 ResidueConst(nh, residue_index,
94 void set_residue_index(
Int v) {
96 get_node().set_value(residue_index_, v);
97 } RMF_DECORATOR_CATCH( );
99 void set_frame_residue_index(
Int v) {
101 get_node().set_frame_value(residue_index_, v);
102 } RMF_DECORATOR_CATCH( );
104 void set_static_residue_index(
Int v) {
106 get_node().set_static_value(residue_index_, v);
107 } RMF_DECORATOR_CATCH( );
111 void set_residue_type(
String v) {
113 get_node().set_value(residue_type_, v);
114 } RMF_DECORATOR_CATCH( );
116 void set_frame_residue_type(
String v) {
118 get_node().set_frame_value(residue_type_, v);
119 } RMF_DECORATOR_CATCH( );
121 void set_static_residue_type(
String v) {
123 get_node().set_static_value(residue_type_, v);
124 } RMF_DECORATOR_CATCH( );
127 static std::string get_decorator_type_name() {
196 class ChainConst:
public Decorator {
197 friend class ChainFactory;
215sequence_offset_(sequence_offset),
216uniprot_accession_(uniprot_accession),
217label_asym_id_(label_asym_id),
218chain_type_(chain_type) {
222 String get_chain_id()
const {
224 return get_node().get_value(chain_id_);
225 } RMF_DECORATOR_CATCH( );
227 String get_frame_chain_id()
const {
229 return get_node().get_frame_value(chain_id_);
230 } RMF_DECORATOR_CATCH( );
232 String get_static_chain_id()
const {
234 return get_node().get_static_value(chain_id_);
235 } RMF_DECORATOR_CATCH( );
239 String get_sequence()
const {
241 if (!get_node().get_has_value(sequence_))
return "";
242return get_node().get_value(sequence_);
243 } RMF_DECORATOR_CATCH( );
245 String get_frame_sequence()
const {
247 if (!get_node().get_has_value(sequence_))
return "";
248return get_node().get_frame_value(sequence_);
249 } RMF_DECORATOR_CATCH( );
251 String get_static_sequence()
const {
253 if (!get_node().get_has_value(sequence_))
return "";
254return get_node().get_static_value(sequence_);
255 } RMF_DECORATOR_CATCH( );
259 Int get_sequence_offset()
const {
261 if (!get_node().get_has_value(sequence_offset_))
return 0;
262return get_node().get_value(sequence_offset_);
263 } RMF_DECORATOR_CATCH( );
265 Int get_frame_sequence_offset()
const {
267 if (!get_node().get_has_value(sequence_offset_))
return 0;
268return get_node().get_frame_value(sequence_offset_);
269 } RMF_DECORATOR_CATCH( );
271 Int get_static_sequence_offset()
const {
273 if (!get_node().get_has_value(sequence_offset_))
return 0;
274return get_node().get_static_value(sequence_offset_);
275 } RMF_DECORATOR_CATCH( );
279 String get_uniprot_accession()
const {
281 if (!get_node().get_has_value(uniprot_accession_))
return "";
282return get_node().get_value(uniprot_accession_);
283 } RMF_DECORATOR_CATCH( );
285 String get_frame_uniprot_accession()
const {
287 if (!get_node().get_has_value(uniprot_accession_))
return "";
288return get_node().get_frame_value(uniprot_accession_);
289 } RMF_DECORATOR_CATCH( );
291 String get_static_uniprot_accession()
const {
293 if (!get_node().get_has_value(uniprot_accession_))
return "";
294return get_node().get_static_value(uniprot_accession_);
295 } RMF_DECORATOR_CATCH( );
299 String get_label_asym_id()
const {
301 if (!get_node().get_has_value(label_asym_id_))
return "";
302return get_node().get_value(label_asym_id_);
303 } RMF_DECORATOR_CATCH( );
305 String get_frame_label_asym_id()
const {
307 if (!get_node().get_has_value(label_asym_id_))
return "";
308return get_node().get_frame_value(label_asym_id_);
309 } RMF_DECORATOR_CATCH( );
311 String get_static_label_asym_id()
const {
313 if (!get_node().get_has_value(label_asym_id_))
return "";
314return get_node().get_static_value(label_asym_id_);
315 } RMF_DECORATOR_CATCH( );
319 String get_chain_type()
const {
321 if (!get_node().get_has_value(chain_type_))
return "UnknownChainType";
322return get_node().get_value(chain_type_);
323 } RMF_DECORATOR_CATCH( );
325 String get_frame_chain_type()
const {
327 if (!get_node().get_has_value(chain_type_))
return "UnknownChainType";
328return get_node().get_frame_value(chain_type_);
329 } RMF_DECORATOR_CATCH( );
331 String get_static_chain_type()
const {
333 if (!get_node().get_has_value(chain_type_))
return "UnknownChainType";
334return get_node().get_static_value(chain_type_);
335 } RMF_DECORATOR_CATCH( );
338 static std::string get_decorator_type_name() {
341 RMF_SHOWABLE(ChainConst,
"Chain: " << get_node());
345 class Chain:
public ChainConst {
346 friend class ChainFactory;
354 ChainConst(nh, chain_id,
363 void set_chain_id(
String v) {
365 get_node().set_value(chain_id_, v);
366 } RMF_DECORATOR_CATCH( );
368 void set_frame_chain_id(
String v) {
370 get_node().set_frame_value(chain_id_, v);
371 } RMF_DECORATOR_CATCH( );
373 void set_static_chain_id(
String v) {
375 get_node().set_static_value(chain_id_, v);
376 } RMF_DECORATOR_CATCH( );
380 void set_sequence(
String v) {
382 get_node().set_value(sequence_, v);
383 } RMF_DECORATOR_CATCH( );
385 void set_frame_sequence(
String v) {
387 get_node().set_frame_value(sequence_, v);
388 } RMF_DECORATOR_CATCH( );
390 void set_static_sequence(
String v) {
392 get_node().set_static_value(sequence_, v);
393 } RMF_DECORATOR_CATCH( );
397 void set_sequence_offset(
Int v) {
399 get_node().set_value(sequence_offset_, v);
400 } RMF_DECORATOR_CATCH( );
402 void set_frame_sequence_offset(
Int v) {
404 get_node().set_frame_value(sequence_offset_, v);
405 } RMF_DECORATOR_CATCH( );
407 void set_static_sequence_offset(
Int v) {
409 get_node().set_static_value(sequence_offset_, v);
410 } RMF_DECORATOR_CATCH( );
414 void set_uniprot_accession(
String v) {
416 get_node().set_value(uniprot_accession_, v);
417 } RMF_DECORATOR_CATCH( );
419 void set_frame_uniprot_accession(
String v) {
421 get_node().set_frame_value(uniprot_accession_, v);
422 } RMF_DECORATOR_CATCH( );
424 void set_static_uniprot_accession(
String v) {
426 get_node().set_static_value(uniprot_accession_, v);
427 } RMF_DECORATOR_CATCH( );
431 void set_label_asym_id(
String v) {
433 get_node().set_value(label_asym_id_, v);
434 } RMF_DECORATOR_CATCH( );
436 void set_frame_label_asym_id(
String v) {
438 get_node().set_frame_value(label_asym_id_, v);
439 } RMF_DECORATOR_CATCH( );
441 void set_static_label_asym_id(
String v) {
443 get_node().set_static_value(label_asym_id_, v);
444 } RMF_DECORATOR_CATCH( );
448 void set_chain_type(
String v) {
450 get_node().set_value(chain_type_, v);
451 } RMF_DECORATOR_CATCH( );
453 void set_frame_chain_type(
String v) {
455 get_node().set_frame_value(chain_type_, v);
456 } RMF_DECORATOR_CATCH( );
458 void set_static_chain_type(
String v) {
460 get_node().set_static_value(chain_type_, v);
461 } RMF_DECORATOR_CATCH( );
464 static std::string get_decorator_type_name() {
488 cat_(fh.get_category(
"sequence")),
489 chain_id_(fh.get_key<StringTag>(cat_,
"chain id")), sequence_(fh.get_key<StringTag>(cat_,
"sequence")), sequence_offset_(fh.get_key<IntTag>(cat_,
"sequence offset")), uniprot_accession_(fh.get_key<StringTag>(cat_,
"uniprot accession")), label_asym_id_(fh.get_key<StringTag>(cat_,
"label asym id")), chain_type_(fh.get_key<StringTag>(cat_,
"chain type")) {
492 cat_(fh.get_category(
"sequence")),
493 chain_id_(fh.get_key<StringTag>(cat_,
"chain id")), sequence_(fh.get_key<StringTag>(cat_,
"sequence")), sequence_offset_(fh.get_key<IntTag>(cat_,
"sequence offset")), uniprot_accession_(fh.get_key<StringTag>(cat_,
"uniprot accession")), label_asym_id_(fh.get_key<StringTag>(cat_,
"label asym id")), chain_type_(fh.get_key<StringTag>(cat_,
"chain type")) {
498 + boost::lexical_cast<std::string>(nh.
get_type())
499 +
"\" in decorator type Chain");
510 + boost::lexical_cast<std::string>(nh.
get_type())
511 +
"\" in decorator type Chain");
512 return Chain(nh, chain_id_,
523 && !nh.get_value(chain_id_).get_is_null();
527 && !nh.get_static_value(chain_id_).get_is_null();
529 RMF_SHOWABLE(ChainFactory,
"ChainFactory");
548 class FragmentConst:
public Decorator {
549 friend class FragmentFactory;
555residue_indexes_(residue_indexes) {
559 Ints get_residue_indexes()
const {
561 return get_node().get_value(residue_indexes_);
562 } RMF_DECORATOR_CATCH( );
564 Ints get_frame_residue_indexes()
const {
566 return get_node().get_frame_value(residue_indexes_);
567 } RMF_DECORATOR_CATCH( );
569 Ints get_static_residue_indexes()
const {
571 return get_node().get_static_value(residue_indexes_);
572 } RMF_DECORATOR_CATCH( );
575 static std::string get_decorator_type_name() {
576 return "FragmentConst";
578 RMF_SHOWABLE(FragmentConst,
"Fragment: " << get_node());
582 class Fragment:
public FragmentConst {
583 friend class FragmentFactory;
586 FragmentConst(nh, residue_indexes) {
590 void set_residue_indexes(
Ints v) {
592 get_node().set_value(residue_indexes_, v);
593 } RMF_DECORATOR_CATCH( );
595 void set_frame_residue_indexes(
Ints v) {
597 get_node().set_frame_value(residue_indexes_, v);
598 } RMF_DECORATOR_CATCH( );
600 void set_static_residue_indexes(
Ints v) {
602 get_node().set_static_value(residue_indexes_, v);
603 } RMF_DECORATOR_CATCH( );
606 static std::string get_decorator_type_name() {
670 class BackwardsCompatibilityFragmentConst:
public Decorator {
671 friend class BackwardsCompatibilityFragmentFactory;
681 Ints get_indexes()
const {
683 return get_node().get_value(indexes_);
684 } RMF_DECORATOR_CATCH( );
686 Ints get_frame_indexes()
const {
688 return get_node().get_frame_value(indexes_);
689 } RMF_DECORATOR_CATCH( );
691 Ints get_static_indexes()
const {
693 return get_node().get_static_value(indexes_);
694 } RMF_DECORATOR_CATCH( );
697 static std::string get_decorator_type_name() {
698 return "BackwardsCompatibilityFragmentConst";
700 RMF_SHOWABLE(BackwardsCompatibilityFragmentConst,
"BackwardsCompatibilityFragment: " << get_node());
704 class BackwardsCompatibilityFragment:
public BackwardsCompatibilityFragmentConst {
705 friend class BackwardsCompatibilityFragmentFactory;
708 BackwardsCompatibilityFragmentConst(nh, indexes) {
712 void set_indexes(
Ints v) {
714 get_node().set_value(indexes_, v);
715 } RMF_DECORATOR_CATCH( );
717 void set_frame_indexes(
Ints v) {
719 get_node().set_frame_value(indexes_, v);
720 } RMF_DECORATOR_CATCH( );
722 void set_static_indexes(
Ints v) {
724 get_node().set_static_value(indexes_, v);
725 } RMF_DECORATOR_CATCH( );
728 static std::string get_decorator_type_name() {
729 return "BackwardsCompatibilityFragment";
792 class DomainConst:
public Decorator {
793 friend class DomainFactory;
795 std::array<IntKey, 2> residue_indexes_;
797 std::array<IntKey, 2> residue_indexes):
799residue_indexes_(residue_indexes) {
803 IntRange get_residue_indexes()
const {
806 ret[0] = get_node().get_value(residue_indexes_[0]);
807 ret[1] = get_node().get_value(residue_indexes_[1]);
809 } RMF_DECORATOR_CATCH( );
811 IntRange get_static_residue_indexes()
const {
814 ret[0] = get_node().get_static_value(residue_indexes_[0]);
815 ret[1] = get_node().get_static_value(residue_indexes_[1]);
817 } RMF_DECORATOR_CATCH( );
819 IntRange get_frame_residue_indexes()
const {
822 ret[0] = get_node().get_frame_value(residue_indexes_[0]);
823 ret[1] = get_node().get_frame_value(residue_indexes_[1]);
825 } RMF_DECORATOR_CATCH( );
828 static std::string get_decorator_type_name() {
829 return "DomainConst";
831 RMF_SHOWABLE(DomainConst,
"Domain: " << get_node());
835 class Domain:
public DomainConst {
836 friend class DomainFactory;
838 std::array<IntKey, 2> residue_indexes):
839 DomainConst(nh, residue_indexes) {
843 void set_residue_indexes(
Int v0,
Int v1) {
845 get_node().set_value(residue_indexes_[0], v0);
846 get_node().set_value(residue_indexes_[1], v1);
847 } RMF_DECORATOR_CATCH( );
849 void set_frame_residue_indexes(
Int v0,
Int v1) {
851 get_node().set_frame_value(residue_indexes_[0], v0);
852 get_node().set_frame_value(residue_indexes_[1], v1);
853 } RMF_DECORATOR_CATCH( );
855 void set_static_residue_indexes(
Int v0,
Int v1) {
857 get_node().set_static_value(residue_indexes_[0], v0);
858 get_node().set_static_value(residue_indexes_[1], v1);
859 } RMF_DECORATOR_CATCH( );
862 static std::string get_decorator_type_name() {
872std::array<IntKey, 2> residue_indexes_;
873 template <
class H> std::array<IntKey, 2> get_residue_indexes_keys(H fh)
const {
874 std::array<IntKey, 2> ret;
875 ret[0] = fh.template get_key<IntTag>(cat_,
"first residue index");
876 ret[1] = fh.template get_key<IntTag>(cat_,
"last residue index");
882 cat_(fh.get_category(
"sequence")),
883 residue_indexes_(get_residue_indexes_keys(fh)) {
886 cat_(fh.get_category(
"sequence")),
887 residue_indexes_(get_residue_indexes_keys(fh)) {
892 + boost::lexical_cast<std::string>(nh.
get_type())
893 +
"\" in decorator type Domain");
899 + boost::lexical_cast<std::string>(nh.
get_type())
900 +
"\" in decorator type Domain");
901 return Domain(nh, residue_indexes_);
907 && !nh.get_value(residue_indexes_[0]).get_is_null() && !nh.get_value(residue_indexes_[1]).get_is_null() && nh.get_value(residue_indexes_[0]) < nh.get_value(residue_indexes_[1]);
911 && !nh.get_static_value(residue_indexes_[0]).get_is_null() && !nh.get_static_value(residue_indexes_[1]).get_is_null() && nh.get_value(residue_indexes_[0]) < nh.get_value(residue_indexes_[1]);
913 RMF_SHOWABLE(DomainFactory,
"DomainFactory");
966 class Typed:
public TypedConst {
967 friend class TypedFactory;
970 TypedConst(nh, type_name) {
974 void set_type_name(
String v) {
976 get_node().set_value(type_name_, v);
977 } RMF_DECORATOR_CATCH( );
979 void set_frame_type_name(
String v) {
981 get_node().set_frame_value(type_name_, v);
982 } RMF_DECORATOR_CATCH( );
984 void set_static_type_name(
String v) {
986 get_node().set_static_value(type_name_, v);
987 } RMF_DECORATOR_CATCH( );
990 static std::string get_decorator_type_name() {
1088 class Copy:
public CopyConst {
1089 friend class CopyFactory;
1092 CopyConst(nh, copy_index) {
1096 void set_copy_index(
Int v) {
1098 get_node().set_value(copy_index_, v);
1099 } RMF_DECORATOR_CATCH( );
1101 void set_frame_copy_index(
Int v) {
1103 get_node().set_frame_value(copy_index_, v);
1104 } RMF_DECORATOR_CATCH( );
1106 void set_static_copy_index(
Int v) {
1108 get_node().set_static_value(copy_index_, v);
1109 } RMF_DECORATOR_CATCH( );
1112 static std::string get_decorator_type_name() {
1210 class State:
public StateConst {
1211 friend class StateFactory;
1214 StateConst(nh, state_index) {
1218 void set_state_index(
Int v) {
1220 get_node().set_value(state_index_, v);
1221 } RMF_DECORATOR_CATCH( );
1223 void set_frame_state_index(
Int v) {
1225 get_node().set_frame_value(state_index_, v);
1226 } RMF_DECORATOR_CATCH( );
1228 void set_static_state_index(
Int v) {
1230 get_node().set_static_value(state_index_, v);
1231 } RMF_DECORATOR_CATCH( );
1234 static std::string get_decorator_type_name() {
1298 class ExplicitResolutionConst:
public Decorator {
1299 friend class ExplicitResolutionFactory;
1305explicit_resolution_(explicit_resolution) {
1309 Float get_explicit_resolution()
const {
1311 return get_node().get_value(explicit_resolution_);
1312 } RMF_DECORATOR_CATCH( );
1314 Float get_frame_explicit_resolution()
const {
1316 return get_node().get_frame_value(explicit_resolution_);
1317 } RMF_DECORATOR_CATCH( );
1319 Float get_static_explicit_resolution()
const {
1321 return get_node().get_static_value(explicit_resolution_);
1322 } RMF_DECORATOR_CATCH( );
1325 static std::string get_decorator_type_name() {
1326 return "ExplicitResolutionConst";
1328 RMF_SHOWABLE(ExplicitResolutionConst,
"ExplicitResolution: " << get_node());
1332 class ExplicitResolution:
public ExplicitResolutionConst {
1333 friend class ExplicitResolutionFactory;
1336 ExplicitResolutionConst(nh, explicit_resolution) {
1340 void set_explicit_resolution(
Float v) {
1342 get_node().set_value(explicit_resolution_, v);
1343 } RMF_DECORATOR_CATCH( );
1345 void set_frame_explicit_resolution(
Float v) {
1347 get_node().set_frame_value(explicit_resolution_, v);
1348 } RMF_DECORATOR_CATCH( );
1350 void set_static_explicit_resolution(
Float v) {
1352 get_node().set_static_value(explicit_resolution_, v);
1353 } RMF_DECORATOR_CATCH( );
1356 static std::string get_decorator_type_name() {
1357 return "ExplicitResolution";
bool get_is(NodeConstHandle nh) const
DomainConst get(NodeConstHandle nh) const
Domain get(NodeHandle nh) const