{"action":"created","issue":{"url":"https://api.github.com/repos/salilab/rmf/issues/123","repository_url":"https://api.github.com/repos/salilab/rmf","labels_url":"https://api.github.com/repos/salilab/rmf/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/salilab/rmf/issues/123/comments","events_url":"https://api.github.com/repos/salilab/rmf/issues/123/events","html_url":"https://github.com/salilab/rmf/issues/123","id":146863067,"number":123,"title":"Help reading rmf data","user":{"login":"Pellarin","id":2477712,"avatar_url":"https://avatars.githubusercontent.com/u/2477712?v=3","gravatar_id":"","url":"https://api.github.com/users/Pellarin","html_url":"https://github.com/Pellarin","followers_url":"https://api.github.com/users/Pellarin/followers","following_url":"https://api.github.com/users/Pellarin/following{/other_user}","gists_url":"https://api.github.com/users/Pellarin/gists{/gist_id}","starred_url":"https://api.github.com/users/Pellarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pellarin/subscriptions","organizations_url":"https://api.github.com/users/Pellarin/orgs","repos_url":"https://api.github.com/users/Pellarin/repos","events_url":"https://api.github.com/users/Pellarin/events{/privacy}","received_events_url":"https://api.github.com/users/Pellarin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-08T08:47:43Z","updated_at":"2016-04-08T08:52:02Z","closed_at":null,"body":"Need some help to convert this python script (that works fine) in cpp. The idea is reading a bunch of numbers from the RMF, stored in the category \"mine\".\r\n\r\n```\r\nimport RMF\r\nf = RMF.open_rmf_file_read_only(\"lookuptable.rmf3\")\r\nf.set_current_frame(RMF.FrameID(0)) \r\n\r\nnh = f.get_root_node().get_children()[0]\r\ncat = f.get_category(\"mine\")\r\n\r\nn=0\r\nv=0\r\nwhile v is not None:\r\n    k = f.get_key(cat,str(n), RMF.vector4_tag)\r\n    v = nh.get_value(k)\r\n    n+=1\r\n```\r\n\r\nI'm stuck in writing the cpp equivalent of  `k = f.get_key(cat,str(n), RMF.vector4_tag)` and `v = nh.get_value(k)`, since they're template functions and I don't see any clear example using them."},"comment":{"url":"https://api.github.com/repos/salilab/rmf/issues/comments/207328915","html_url":"https://github.com/salilab/rmf/issues/123#issuecomment-207328915","issue_url":"https://api.github.com/repos/salilab/rmf/issues/123","id":207328915,"user":{"login":"Pellarin","id":2477712,"avatar_url":"https://avatars.githubusercontent.com/u/2477712?v=3","gravatar_id":"","url":"https://api.github.com/users/Pellarin","html_url":"https://github.com/Pellarin","followers_url":"https://api.github.com/users/Pellarin/followers","following_url":"https://api.github.com/users/Pellarin/following{/other_user}","gists_url":"https://api.github.com/users/Pellarin/gists{/gist_id}","starred_url":"https://api.github.com/users/Pellarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pellarin/subscriptions","organizations_url":"https://api.github.com/users/Pellarin/orgs","repos_url":"https://api.github.com/users/Pellarin/repos","events_url":"https://api.github.com/users/Pellarin/events{/privacy}","received_events_url":"https://api.github.com/users/Pellarin/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T08:52:02Z","updated_at":"2016-04-08T08:52:02Z","body":"My current attempt is the following:\r\n\r\n```\r\n       RMF::ID<RMF::Vector<4>> k = f.get_key<RMF::Vector<4>>(cat,s);\r\n       RMF::Nullable<RMF::Vector<4>> v = nh.get_value<RMF::Vector<4>>(k);\r\n```\r\n\r\nBut have no success:\r\n\r\n```\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/FileConstHandle.h:135:52: error: no matching function for call to ‘RMF::internal::SharedData::get_key(RMF::Category&, std::string&, RMF::Vector<4u>)’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/FileConstHandle.h:135:52: note: candidates are:\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<int>, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<int>’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<float>, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<float>’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<std::basic_string<char> >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<std::basic_string<char> >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<std::vector<int> >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<std::vector<int> >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<std::vector<float> >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<std::vector<float> >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<std::vector<std::basic_string<char> > >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<std::vector<std::basic_string<char> > >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<RMF::Vector<3u> >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<RMF::Vector<3u> >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<RMF::Vector<4u> >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<RMF::Vector<4u> >’\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note: RMF::ID<TagT> RMF::internal::SharedDataKeys<Traits>::get_key(RMF::Category, std::string, Traits) [with Traits = RMF::Traits<std::vector<RMF::Vector<3u> > >, RMF::Category = RMF::ID<RMF::CategoryTag>, std::string = std::basic_string<char>]\r\n/work/pellarin/imp-projects/imp-040416/imp/modules/rmf/dependency/RMF/include/RMF/internal/SharedDataKeys.h:52:14: note:   no known conversion for argument 3 from ‘RMF::Vector<4u>’ to ‘RMF::Traits<std::vector<RMF::Vector<3u> > >’\r\n```"}}