{"id":18336121,"url":"https://github.com/tpvasconcelos/mdsea","last_synced_at":"2026-04-02T01:57:40.383Z","repository":{"id":97348554,"uuid":"150737451","full_name":"tpvasconcelos/mdsea","owner":"tpvasconcelos","description":"Pure Python Framework for Computational Fluid Dynamics","archived":false,"fork":false,"pushed_at":"2024-08-29T10:40:24.000Z","size":132449,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-29T11:58:26.510Z","etag":null,"topics":["blender","cfd","fluid-dynamics","fluid-simulation","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpvasconcelos.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":"2018-09-28T12:30:17.000Z","updated_at":"2024-08-19T16:04:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ed6e2fb-80c7-4d35-87c5-d54be233f5d4","html_url":"https://github.com/tpvasconcelos/mdsea","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpvasconcelos%2Fmdsea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpvasconcelos%2Fmdsea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpvasconcelos%2Fmdsea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpvasconcelos%2Fmdsea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpvasconcelos","download_url":"https://codeload.github.com/tpvasconcelos/mdsea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223238121,"owners_count":17111359,"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":["blender","cfd","fluid-dynamics","fluid-simulation","python","python3"],"created_at":"2024-11-05T20:06:11.502Z","updated_at":"2026-04-02T01:57:40.343Z","avatar_url":"https://github.com/tpvasconcelos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdsea\n\nmdsea is a stand-alone Python molecular dynamics library equipped with a\nflexible simulation engine and multiple analysis tools, including\nintegrated beautiful visualization in 1, 2, and 3 dimensions.\n\n\n## Getting started\n\n\n### Prerequisites\n\nmdsea requires **Python \u003e= 3.6**. The\n**minimal** requirements for this project will be automatically\ninstalled with `setup.py`.\n\n\n### Installing\n\nTo install mdsea you need to get the source and execute the `setup.py`\nscript\n\n```sh\ngit clone https://github.com/TPVasconcelos/mdsea.git\ncd mdsea\npython setup.py install\n```\n\n\n### Extra requirements\n\nIn order to install the complete set of requirements and be able to\nmake the most use of mdsea, run\n\n```sh\npip install -r requirements.txt\n```\n\nTo render 3D animation with [Blender](https://www.blender.org), you will\nneed to [download](https://www.blender.org/download/) and install it on\nyour machine first. If you want mdsea to render mp4 animation files\nfor you, you will also need to\n[install ffmpeg](https://www.ffmpeg.org/download.html).\n\n\n\n## Running the tests\n\nYou can find the test scripts inside the `/tests` directory.\n\nYou should start by running\n```sh\ncd tests\npython initsetup.py\n```\n\nwhich will run a default simulation and store in in\n`./simfiles/_mdsea_testsimulation/*`. You can then run tests for the\nmultiple visualization tools (`/tests/vis_*.py`) - See bellow how to run\nthe Blender tests! - The `/tests/cleanup.py` script will remove the\n`/simfiles/_mdsea_testsimulation` directory.\n\n### Running Blender tests\n\nBlender uses its own python interpreter, so you will need to install\nmdsea there as well. Find out where the python binary is stored and\nexecute the following command. e.g. on macOS:\n```sh\ncd mdsea\n/path/to/blender.app/Contents/Resources/2.XX/python/bin/python setup.py  install --force\n```\n\nTo run the tests, execute\n```sh\ncd tests\n/path/to/blender.app/Contents/MacOS/blender --python vis_blender.py\n```\n\nI'd also suggest that you add\n```\nalias blender=/path/to/blender.app/Contents/MacOS/blender\n```\nto `.bash_profile` and `.profile`.\n\n```sh\necho \"alias blender=/path/to/blender.app/Contents/MacOS/blender\" \u003e\u003e ~/.profile\necho \"alias blender=/path/to/blender.app/Contents/MacOS/blender\" \u003e\u003e ~/.bash_profile\n```\n\nIn\n[Blender’s documentation](https://docs.blender.org/manual/en/dev/render/workflows/command_line.html#platforms)\nthey only state the alias in `~/.profile` but this is only read by\n_login_ shells. On the other hand, `~/.bash_profile` is read by\n_interactive_ shells (like the one linked to Terminal).\n\n\n## Example\n\n```python\nfrom mdsea.core import SysManager\nfrom mdsea.helpers import setup_logging\nfrom mdsea.potentials import Potential\nfrom mdsea.simulator import ContinuousPotentialSolver\n\nsetup_logging(level=\"DEBUG\")\n\n# Instantiate system manager  ---\nsm = SysManager.new(\n    simid=\"_mdsea_docs_example\",\n    ndim=2,\n    num_particles=6 ** 2,\n    steps=500,\n    vol_fraction=0.2,\n    radius_particle=0.5,\n)\n\n# Instantiate simulation  ---\nsim = ContinuousPotentialSolver(sm, pot=Potential.lennardjones(1, 1))\n\n# Run the simulation  ---\nsim.run_simulation()\n\n# Run 2D animation with matplotlib  ---\nfrom mdsea.vis.matplotlib import MLPAnimationScatter\n\nanim = MLPAnimationScatter(sm, frame_step=6, colorspeed=True)\nanim.anim()\n```\n\nThe output should look something like this (you can ignore the warning):\n```\n[INFO:mdsea.core] New simulation: {'id': '_mdsea_docs_example', 'path': 'simfiles/_mdsea_docs_example'}\n[WARNING:mdsea.core] A ValueError ('Not a location (invalid object ID)') was catched while trying to update a dataset. However, we noticed that the datafile in question wasn't open. We'll try to fix this and retry...\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'step': '28/500', 'percentage': 6, 'ETA': '1s'}\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'step': '73/500', 'percentage': 15, 'ETA': '1s'}\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'step': '128/500', 'percentage': 26, 'ETA': '1s'}\n...\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'step': '428/500', 'percentage': 86, 'ETA': '0s'}\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'step': '473/500', 'percentage': 95, 'ETA': '0s'}\n[INFO:mdsea.simulator] ProgresBar (Simulator): {'status': 'finished', 'lifetime': '1.1s'}\n[INFO:mdsea.vis.mpl] Plotting anim_loop...\n```\n\n\n## Gallery\n\n### 3D renderings\n\n![1d](assets/images/untitled-copy-2.png)\n\n![1d](assets/images/spong.png)\n\n![1d](assets/images/spong-melt.png)\n\n![1d](assets/images/orange-blob.png)\n\n![1d](assets/images/megabiiiig.png)\n\n![1d](assets/images/img000001.png)\n\n\n### GIFs\n\n**1D Simulation:**\n\n![1d](assets/gifs/1d-colorspeed-pbc.gif)\n\n**2D Simulation:**\n\n![2d](assets/gifs/2d-smalvolfrac.gif)\n\n**3D Simulation with Blender's Cycles rendering engine:**\n\n![3d-cycles](assets/gifs/cycles.gif)\n\n\n---\n\n## Licence\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpvasconcelos%2Fmdsea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpvasconcelos%2Fmdsea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpvasconcelos%2Fmdsea/lists"}