{"action":"created","comment":{"url":"https://api.github.com/repos/espressomd/espresso/pulls/comments/79483097","id":79483097,"diff_hunk":"@@ -0,0 +1,707 @@\n+/*\n+  Copyright (C) 2010,2011,2012,2013,2014,2015,2016 The ESPResSo project\n+  Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 \n+    Max-Planck-Institute for Polymer Research, Theory Group\n+  \n+  This file is part of ESPResSo.\n+  \n+  ESPResSo is free software: you can redistribute it and/or modify\n+  it under the terms of the GNU General Public License as published by\n+  the Free Software Foundation, either version 3 of the License, or\n+  (at your option) any later version.\n+  \n+  ESPResSo is distributed in the hope that it will be useful,\n+  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+  GNU General Public License for more details.\n+  \n+  You should have received a copy of the GNU General Public License\n+  along with this program.  If not, see <http://www.gnu.org/licenses/>. \n+*/\n+\n+\n+#include \"h5md_core.hpp\"\n+\n+\n+namespace writer {\n+namespace h5md {\n+\n+\n+/* Constructor for the File class. */\n+File::File(std::string const &filename, std::string const &script_name)\n+{\n+    boost::filesystem::path script_path(script_name);\n+    this->absolute_script_path = boost::filesystem::canonical(script_path);\n+    /* Store the filename in a member variable. */\n+    this->user_filename = filename;\n+    /* Get number of local particles. */\n+    this->n_local_part = cells_get_n_particles();\n+    if(!(this->n_local_part > 0)) {\n+        throw std::runtime_error(\"Please first set up particles before initializing the H5md object.\");\n+    } \n+    /* Check if a file with given filename exists. */\n+    bool file_exists = this->check_file_exists(filename);\n+    /* If it exists, check for the H5MD structure. */\n+    if (file_exists)\n+    {\n+        this->has_H5MD_structure = check_for_H5MD_structure(filename);\n+    }\n+    if (file_exists && this->has_H5MD_structure)\n+    {\n+        /*\n+         * If the file exists and has a valid H5MD structure, lets create a new file and copy the hdf5 objects.\n+         * This has the advantage, that the new file can just be deleted if the simulation crashes at some point and we\n+         * still have a valid trajectory, we can start from.\n+        */\n+        std::string temp_name = filename + \"_tmp\";\n+        this->lastfile = h5xx::file(filename, MPI_COMM_WORLD, MPI_INFO_NULL,\n+                                     h5xx::file::out);\n+        this->h5md_file = h5xx::file(temp_name, MPI_COMM_WORLD, MPI_INFO_NULL,\n+                                     h5xx::file::out);\n+        /* particles -- atoms -- box -- edges */\n+        H5Ocopy(lastfile.hid(), \"/particles\", this->h5md_file.hid(), \"/particles\", H5P_DEFAULT,","path":"src/core/io/writer/h5md/h5md_core.cpp","position":62,"original_position":62,"commit_id":"18ba8b24580e634c639fef384089054429643ef7","original_commit_id":"18ba8b24580e634c639fef384089054429643ef7","user":{"login":"pdebuyl","id":1121690,"avatar_url":"https://avatars.githubusercontent.com/u/1121690?v=3","gravatar_id":"","url":"https://api.github.com/users/pdebuyl","html_url":"https://github.com/pdebuyl","followers_url":"https://api.github.com/users/pdebuyl/followers","following_url":"https://api.github.com/users/pdebuyl/following{/other_user}","gists_url":"https://api.github.com/users/pdebuyl/gists{/gist_id}","starred_url":"https://api.github.com/users/pdebuyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdebuyl/subscriptions","organizations_url":"https://api.github.com/users/pdebuyl/orgs","repos_url":"https://api.github.com/users/pdebuyl/repos","events_url":"https://api.github.com/users/pdebuyl/events{/privacy}","received_events_url":"https://api.github.com/users/pdebuyl/received_events","type":"User","site_admin":false},"body":"@mkuron Regarding the choice of dataset storage, the use of a large number of datasets is known to result in poor performance (from following the mailing list of the hdf group). If you have specific questions, feel free to contact the H5MD mailing list https://lists.nongnu.org/mailman/listinfo/h5md-user","created_at":"2016-09-19T20:36:23Z","updated_at":"2016-09-19T20:36:23Z","html_url":"https://github.com/espressomd/espresso/pull/745#discussion_r79483097","pull_request_url":"https://api.github.com/repos/espressomd/espresso/pulls/745","_links":{"self":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/comments/79483097"},"html":{"href":"https://github.com/espressomd/espresso/pull/745#discussion_r79483097"},"pull_request":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/745"}}},"pull_request":{"url":"https://api.github.com/repos/espressomd/espresso/pulls/745","id":78288172,"html_url":"https://github.com/espressomd/espresso/pull/745","diff_url":"https://github.com/espressomd/espresso/pull/745.diff","patch_url":"https://github.com/espressomd/espresso/pull/745.patch","issue_url":"https://api.github.com/repos/espressomd/espresso/issues/745","number":745,"state":"open","locked":false,"title":"H5mdcore","user":{"login":"KaiSzuttor","id":2150555,"avatar_url":"https://avatars.githubusercontent.com/u/2150555?v=3","gravatar_id":"","url":"https://api.github.com/users/KaiSzuttor","html_url":"https://github.com/KaiSzuttor","followers_url":"https://api.github.com/users/KaiSzuttor/followers","following_url":"https://api.github.com/users/KaiSzuttor/following{/other_user}","gists_url":"https://api.github.com/users/KaiSzuttor/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiSzuttor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiSzuttor/subscriptions","organizations_url":"https://api.github.com/users/KaiSzuttor/orgs","repos_url":"https://api.github.com/users/KaiSzuttor/repos","events_url":"https://api.github.com/users/KaiSzuttor/events{/privacy}","received_events_url":"https://api.github.com/users/KaiSzuttor/received_events","type":"User","site_admin":false},"body":"Implemented writing H5MD files from within the core. This should be easy extendible to multi-core writing.","created_at":"2016-07-21T09:55:49Z","updated_at":"2016-09-19T20:36:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5455badf5b7e62c68b5a94ce320660bb2a5a166d","assignee":{"login":"fweik","id":893663,"avatar_url":"https://avatars.githubusercontent.com/u/893663?v=3","gravatar_id":"","url":"https://api.github.com/users/fweik","html_url":"https://github.com/fweik","followers_url":"https://api.github.com/users/fweik/followers","following_url":"https://api.github.com/users/fweik/following{/other_user}","gists_url":"https://api.github.com/users/fweik/gists{/gist_id}","starred_url":"https://api.github.com/users/fweik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fweik/subscriptions","organizations_url":"https://api.github.com/users/fweik/orgs","repos_url":"https://api.github.com/users/fweik/repos","events_url":"https://api.github.com/users/fweik/events{/privacy}","received_events_url":"https://api.github.com/users/fweik/received_events","type":"User","site_admin":false},"assignees":[{"login":"fweik","id":893663,"avatar_url":"https://avatars.githubusercontent.com/u/893663?v=3","gravatar_id":"","url":"https://api.github.com/users/fweik","html_url":"https://github.com/fweik","followers_url":"https://api.github.com/users/fweik/followers","following_url":"https://api.github.com/users/fweik/following{/other_user}","gists_url":"https://api.github.com/users/fweik/gists{/gist_id}","starred_url":"https://api.github.com/users/fweik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fweik/subscriptions","organizations_url":"https://api.github.com/users/fweik/orgs","repos_url":"https://api.github.com/users/fweik/repos","events_url":"https://api.github.com/users/fweik/events{/privacy}","received_events_url":"https://api.github.com/users/fweik/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/espressomd/espresso/pulls/745/commits","review_comments_url":"https://api.github.com/repos/espressomd/espresso/pulls/745/comments","review_comment_url":"https://api.github.com/repos/espressomd/espresso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/espressomd/espresso/issues/745/comments","statuses_url":"https://api.github.com/repos/espressomd/espresso/statuses/18ba8b24580e634c639fef384089054429643ef7","head":{"label":"KaiSzuttor:h5mdcore","ref":"h5mdcore","sha":"18ba8b24580e634c639fef384089054429643ef7","user":{"login":"KaiSzuttor","id":2150555,"avatar_url":"https://avatars.githubusercontent.com/u/2150555?v=3","gravatar_id":"","url":"https://api.github.com/users/KaiSzuttor","html_url":"https://github.com/KaiSzuttor","followers_url":"https://api.github.com/users/KaiSzuttor/followers","following_url":"https://api.github.com/users/KaiSzuttor/following{/other_user}","gists_url":"https://api.github.com/users/KaiSzuttor/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiSzuttor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiSzuttor/subscriptions","organizations_url":"https://api.github.com/users/KaiSzuttor/orgs","repos_url":"https://api.github.com/users/KaiSzuttor/repos","events_url":"https://api.github.com/users/KaiSzuttor/events{/privacy}","received_events_url":"https://api.github.com/users/KaiSzuttor/received_events","type":"User","site_admin":false},"repo":{"id":13266037,"name":"espresso","full_name":"KaiSzuttor/espresso","owner":{"login":"KaiSzuttor","id":2150555,"avatar_url":"https://avatars.githubusercontent.com/u/2150555?v=3","gravatar_id":"","url":"https://api.github.com/users/KaiSzuttor","html_url":"https://github.com/KaiSzuttor","followers_url":"https://api.github.com/users/KaiSzuttor/followers","following_url":"https://api.github.com/users/KaiSzuttor/following{/other_user}","gists_url":"https://api.github.com/users/KaiSzuttor/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiSzuttor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiSzuttor/subscriptions","organizations_url":"https://api.github.com/users/KaiSzuttor/orgs","repos_url":"https://api.github.com/users/KaiSzuttor/repos","events_url":"https://api.github.com/users/KaiSzuttor/events{/privacy}","received_events_url":"https://api.github.com/users/KaiSzuttor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KaiSzuttor/espresso","description":"The ESPResSo package","fork":true,"url":"https://api.github.com/repos/KaiSzuttor/espresso","forks_url":"https://api.github.com/repos/KaiSzuttor/espresso/forks","keys_url":"https://api.github.com/repos/KaiSzuttor/espresso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KaiSzuttor/espresso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KaiSzuttor/espresso/teams","hooks_url":"https://api.github.com/repos/KaiSzuttor/espresso/hooks","issue_events_url":"https://api.github.com/repos/KaiSzuttor/espresso/issues/events{/number}","events_url":"https://api.github.com/repos/KaiSzuttor/espresso/events","assignees_url":"https://api.github.com/repos/KaiSzuttor/espresso/assignees{/user}","branches_url":"https://api.github.com/repos/KaiSzuttor/espresso/branches{/branch}","tags_url":"https://api.github.com/repos/KaiSzuttor/espresso/tags","blobs_url":"https://api.github.com/repos/KaiSzuttor/espresso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KaiSzuttor/espresso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KaiSzuttor/espresso/git/refs{/sha}","trees_url":"https://api.github.com/repos/KaiSzuttor/espresso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KaiSzuttor/espresso/statuses/{sha}","languages_url":"https://api.github.com/repos/KaiSzuttor/espresso/languages","stargazers_url":"https://api.github.com/repos/KaiSzuttor/espresso/stargazers","contributors_url":"https://api.github.com/repos/KaiSzuttor/espresso/contributors","subscribers_url":"https://api.github.com/repos/KaiSzuttor/espresso/subscribers","subscription_url":"https://api.github.com/repos/KaiSzuttor/espresso/subscription","commits_url":"https://api.github.com/repos/KaiSzuttor/espresso/commits{/sha}","git_commits_url":"https://api.github.com/repos/KaiSzuttor/espresso/git/commits{/sha}","comments_url":"https://api.github.com/repos/KaiSzuttor/espresso/comments{/number}","issue_comment_url":"https://api.github.com/repos/KaiSzuttor/espresso/issues/comments{/number}","contents_url":"https://api.github.com/repos/KaiSzuttor/espresso/contents/{+path}","compare_url":"https://api.github.com/repos/KaiSzuttor/espresso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KaiSzuttor/espresso/merges","archive_url":"https://api.github.com/repos/KaiSzuttor/espresso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KaiSzuttor/espresso/downloads","issues_url":"https://api.github.com/repos/KaiSzuttor/espresso/issues{/number}","pulls_url":"https://api.github.com/repos/KaiSzuttor/espresso/pulls{/number}","milestones_url":"https://api.github.com/repos/KaiSzuttor/espresso/milestones{/number}","notifications_url":"https://api.github.com/repos/KaiSzuttor/espresso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KaiSzuttor/espresso/labels{/name}","releases_url":"https://api.github.com/repos/KaiSzuttor/espresso/releases{/id}","deployments_url":"https://api.github.com/repos/KaiSzuttor/espresso/deployments","created_at":"2013-10-02T08:27:01Z","updated_at":"2015-04-17T13:44:17Z","pushed_at":"2016-09-08T15:31:45Z","git_url":"git://github.com/KaiSzuttor/espresso.git","ssh_url":"git@github.com:KaiSzuttor/espresso.git","clone_url":"https://github.com/KaiSzuttor/espresso.git","svn_url":"https://github.com/KaiSzuttor/espresso","homepage":"http://espressomd.org","size":80431,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"espressomd:master","ref":"master","sha":"b467318fccbf90eb5675edcd3876f1f41da17aa3","user":{"login":"espressomd","id":689837,"avatar_url":"https://avatars.githubusercontent.com/u/689837?v=3","gravatar_id":"","url":"https://api.github.com/users/espressomd","html_url":"https://github.com/espressomd","followers_url":"https://api.github.com/users/espressomd/followers","following_url":"https://api.github.com/users/espressomd/following{/other_user}","gists_url":"https://api.github.com/users/espressomd/gists{/gist_id}","starred_url":"https://api.github.com/users/espressomd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espressomd/subscriptions","organizations_url":"https://api.github.com/users/espressomd/orgs","repos_url":"https://api.github.com/users/espressomd/repos","events_url":"https://api.github.com/users/espressomd/events{/privacy}","received_events_url":"https://api.github.com/users/espressomd/received_events","type":"Organization","site_admin":false},"repo":{"id":1524644,"name":"espresso","full_name":"espressomd/espresso","owner":{"login":"espressomd","id":689837,"avatar_url":"https://avatars.githubusercontent.com/u/689837?v=3","gravatar_id":"","url":"https://api.github.com/users/espressomd","html_url":"https://github.com/espressomd","followers_url":"https://api.github.com/users/espressomd/followers","following_url":"https://api.github.com/users/espressomd/following{/other_user}","gists_url":"https://api.github.com/users/espressomd/gists{/gist_id}","starred_url":"https://api.github.com/users/espressomd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espressomd/subscriptions","organizations_url":"https://api.github.com/users/espressomd/orgs","repos_url":"https://api.github.com/users/espressomd/repos","events_url":"https://api.github.com/users/espressomd/events{/privacy}","received_events_url":"https://api.github.com/users/espressomd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/espressomd/espresso","description":"The ESPResSo package","fork":false,"url":"https://api.github.com/repos/espressomd/espresso","forks_url":"https://api.github.com/repos/espressomd/espresso/forks","keys_url":"https://api.github.com/repos/espressomd/espresso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/espressomd/espresso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/espressomd/espresso/teams","hooks_url":"https://api.github.com/repos/espressomd/espresso/hooks","issue_events_url":"https://api.github.com/repos/espressomd/espresso/issues/events{/number}","events_url":"https://api.github.com/repos/espressomd/espresso/events","assignees_url":"https://api.github.com/repos/espressomd/espresso/assignees{/user}","branches_url":"https://api.github.com/repos/espressomd/espresso/branches{/branch}","tags_url":"https://api.github.com/repos/espressomd/espresso/tags","blobs_url":"https://api.github.com/repos/espressomd/espresso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/espressomd/espresso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/espressomd/espresso/git/refs{/sha}","trees_url":"https://api.github.com/repos/espressomd/espresso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/espressomd/espresso/statuses/{sha}","languages_url":"https://api.github.com/repos/espressomd/espresso/languages","stargazers_url":"https://api.github.com/repos/espressomd/espresso/stargazers","contributors_url":"https://api.github.com/repos/espressomd/espresso/contributors","subscribers_url":"https://api.github.com/repos/espressomd/espresso/subscribers","subscription_url":"https://api.github.com/repos/espressomd/espresso/subscription","commits_url":"https://api.github.com/repos/espressomd/espresso/commits{/sha}","git_commits_url":"https://api.github.com/repos/espressomd/espresso/git/commits{/sha}","comments_url":"https://api.github.com/repos/espressomd/espresso/comments{/number}","issue_comment_url":"https://api.github.com/repos/espressomd/espresso/issues/comments{/number}","contents_url":"https://api.github.com/repos/espressomd/espresso/contents/{+path}","compare_url":"https://api.github.com/repos/espressomd/espresso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/espressomd/espresso/merges","archive_url":"https://api.github.com/repos/espressomd/espresso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/espressomd/espresso/downloads","issues_url":"https://api.github.com/repos/espressomd/espresso/issues{/number}","pulls_url":"https://api.github.com/repos/espressomd/espresso/pulls{/number}","milestones_url":"https://api.github.com/repos/espressomd/espresso/milestones{/number}","notifications_url":"https://api.github.com/repos/espressomd/espresso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/espressomd/espresso/labels{/name}","releases_url":"https://api.github.com/repos/espressomd/espresso/releases{/id}","deployments_url":"https://api.github.com/repos/espressomd/espresso/deployments","created_at":"2011-03-25T07:43:15Z","updated_at":"2016-08-29T16:40:23Z","pushed_at":"2016-09-19T19:36:33Z","git_url":"git://github.com/espressomd/espresso.git","ssh_url":"git@github.com:espressomd/espresso.git","clone_url":"https://github.com/espressomd/espresso.git","svn_url":"https://github.com/espressomd/espresso","homepage":"http://espressomd.org","size":91991,"stargazers_count":49,"watchers_count":49,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":102,"forks":83,"open_issues":102,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/745"},"html":{"href":"https://github.com/espressomd/espresso/pull/745"},"issue":{"href":"https://api.github.com/repos/espressomd/espresso/issues/745"},"comments":{"href":"https://api.github.com/repos/espressomd/espresso/issues/745/comments"},"review_comments":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/745/comments"},"review_comment":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/espressomd/espresso/pulls/745/commits"},"statuses":{"href":"https://api.github.com/repos/espressomd/espresso/statuses/18ba8b24580e634c639fef384089054429643ef7"}}}}
{"actor":{"display_login":"pdebuyl"}}