{"id":19332688,"url":"https://github.com/bartbruininks/mdvcontainment","last_synced_at":"2025-04-22T23:33:02.381Z","repository":{"id":186727171,"uuid":"675622376","full_name":"BartBruininks/mdvcontainment","owner":"BartBruininks","description":"Robust characterization of inside and outside in periodic spaces.","archived":false,"fork":false,"pushed_at":"2024-12-10T11:43:37.000Z","size":10077,"stargazers_count":6,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T05:13:55.417Z","etag":null,"topics":["containment","graph","md","molecular-dynamics","point-cloud","segmentation","topology","visualization","voxels"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BartBruininks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-07T10:49:03.000Z","updated_at":"2024-12-10T11:43:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b45004cd-3ea0-4be5-a832-6f7b8c662183","html_url":"https://github.com/BartBruininks/mdvcontainment","commit_stats":null,"previous_names":["bartbruininks/mdvcontainment"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartBruininks%2Fmdvcontainment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartBruininks%2Fmdvcontainment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartBruininks%2Fmdvcontainment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartBruininks%2Fmdvcontainment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BartBruininks","download_url":"https://codeload.github.com/BartBruininks/mdvcontainment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250340661,"owners_count":21414608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containment","graph","md","molecular-dynamics","point-cloud","segmentation","topology","visualization","voxels"],"created_at":"2024-11-10T02:47:05.526Z","updated_at":"2025-04-22T23:33:01.714Z","avatar_url":"https://github.com/BartBruininks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MDVContainment—OPEN BETA\nRobust and fast containment charaterization for (periodic) point clouds and voxel masks.\n\n**M**olecular **D**ynamics **V**oxel **Containment** yields a robust characterization of the inside and outside hierarchy for point clouds in periodic spaces of dimensionality three or lower (e.g. R^3/Z^3).\n\nUsing an MDAnalysis atomgroup, bead selection and resolution, a density grid is created. This density grid is segmented using connected components, and graph logic is utilized to solve the topological identification of containment (insides and outsides). The final output is a set of Directed Acyclic Graphs (DAGs) running from the largest container to the smallest (from outside inwards in graph space). This containment logic can then be used to analyse or manipulate the systems.\n\n *Any complex configuration of (non)periodic segments is supported by this algorithm in a fast, robust, unambiguous, deterministic and rot+trans invarient (up to voxel discretization) manner.*\n\n\u003e [!NOTE]\n\u003e MDVContainment has had a rework offering much improved performance and quality. However,\n\u003e here is the [legacy](https://github.com/BartBruininks/mdvcontainment/tree/legacy) version if you insist on using it.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/BartBruininks/mdvcontainment/assets/1488903/be5fff63-a967-47c2-a933-a3ecb7dcd5de\"\u003e\n\u003c/p\u003e\n\n**Figure 1 | Containment hierarchy in self-assembled acyl chain bicelles.** The main solvent (segment -2) is the most outer segment in this system. It containes three non-periodic segments (1, 2, 3), where segment 1 is split over the periodic boundary. Segment 3 *contains* a bubble of inner solvent (segment -1).\n\n$~$\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/BartBruininks/mdvcontainment/assets/1488903/da3d8cdb-682f-4fe3-b7dc-bced188b390d\"\u003e\n\u003c/p\u003e\n \n**Figure 2 | A periodic hollow cylinder in solution**. The cylinder (segment 1) splits the solution into two segments (segment -2, -1), the solid cylinder inside the hollow cylinder (segment -1), and all of the space outside of the cylinder (segment -2). Both cylindrical segments (1 and -1) are said to be *contained* by the solvent segment (-2), although only the hollow cylinder (1) is a *child* of the solvent segment (-2).\n\n$~$\n\n# Citation and License\nThis work is currently in the process of publication, the DOI of the mansucript will be placed here once it is available. \n\nPlease cite this work if you use it for scientific publications. It helps me to continue to work on this kind of software, thanks! On that note, if you would offer me a job to work on this, I would take your offer very seriously.\n\nMDVContainment is available under the Apache-2.0 license.\n\n# Requirements\nMDVContainment has been tested to work with python \u003e= 3.8 and Ubuntu 20.04.6 LTS. \n\n# Installation\n## Using git\nDirect install into the current python environment libraries:\n\n```console\npip install git+https://github.com/BartBruininks/mdvcontainment\n```\n\nCreate a folder in a custom location to have access to the examples folder:\n\n```console\ngit clone git@github.com:BartBruininks/mdvcontainment.git\ncd mdvcontainment\npip install .\n```\n\n\u003e [!IMPORTANT]\n\u003e If you need any help with MDVContainment or have ideas for future functionalities, please raise an issue!\n\n# Minimal example CG Martini\n\u003cdetails open\u003e\n\u003csummary\u003eInput\u003c/summary\u003e\n\u003cbr\u003e\n\n```python\n# `minimal_example.py` for a CG Martini structure file\n# Import the required libraries\nimport MDAnalysis as mda\nfrom mdvcontainment import Containment\n\n# Import the structure file\npath = 'your_structure.pdb' # Or any MDA supported structures file\nuniverse = mda.Universe(path)\nselection_string = 'not resname W WF ION' # Useful for CG Martini\nselection = universe.select_atoms(selection_string)\n\n# Run the containment analysis\ncontainment = Containment(selection, resolution=0.5, closure=True)\n\n# Show the containment graph with voxel counts\nprint(containment)\n```\n\u003c/details\u003e\n\n\u003e [!NOTE]\n\u003e For atomistic structures use `closure=False`. Take a look at\n\u003e [closing](https://en.wikipedia.org/wiki/Closing_(morphology)) (link to wikipedia) to learn more about what it does.\n\n\u003cdetails open\u003e\n\u003csummary\u003eOutput\u003c/summary\u003e\n\u003cbr\u003e\n\n```\nContainment Graph with 3 components (component: nvoxels):\n└── [-2: 54461]\n    └── [1: 15403]\n        └── [-1: 5136]\n```\n\u003c/details\u003e\n\n\n# Extensive examples\nFor worked examples in jupyter notebooks, take a look at the [examples/notebooks](https://github.com/BartBruininks/mdvcontainment/tree/main/examples/notebooks) folder. Some example structure files are added under [examples/structures](https://github.com/BartBruininks/mdvcontainment/tree/main/examples/structures).\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartbruininks%2Fmdvcontainment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartbruininks%2Fmdvcontainment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartbruininks%2Fmdvcontainment/lists"}