{"id":24380,"library":"pypartmc","title":"PyPartMC","description":"Python interface to the PartMC (Particle Monte Carlo) model for simulating atmospheric aerosol dynamics. Version 2.0.6. Uses nanobind bindings. Irregular release cadence, roughly monthly.","status":"active","version":"2.0.6","language":"python","source_language":"en","source_url":"https://github.com/open-atmos/PyPartMC","tags":["aerosol","partmc","atmospheric chemistry","monte carlo","nanobind"],"install":[{"cmd":"pip install pypartmc","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge pypartmc","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Numerical arrays, used in input/output","package":"numpy","optional":false}],"imports":[{"note":"Top-level module, not pypartmc or partmc","wrong":"","symbol":"PyPartMC","correct":"import PyPartMC"}],"quickstart":{"code":"import PyPartMC as ppmc\nimport numpy as np\naero_data = ppmc.AeroData(\n    [\"SO4\", \"NaCl\"],\n    [ppmc.AeroData.species_data(\"SO4\", density=1.8, kappa=0.5),\n     ppmc.AeroData.species_data(\"NaCl\", density=2.16, kappa=1.0)]\n)\nstate = ppmc.GasState(aero_data)\nstate.set_conc(np.array([1e-5, 2e-5]))\nprint(state.conc)","lang":"python","description":"Initialize aerosol species data, create gas state, set concentrations."},"warnings":[{"fix":"Reinstall pypartmc and ensure all dependencies are up-to-date.","message":"PyPartMC v2.0.0 switched from pybind11 to nanobind. Code compiled against previous versions may need reinstallation. The module import path remains 'PyPartMC'.","severity":"breaking","affected_versions":">=2.0.0,<3.0.0"},{"fix":"Use 'import PyPartMC'.","message":"Always use 'import PyPartMC', not 'import pypartmc' or 'import partmc'. The package name is pypartmc on PyPI, but the Python module is PyPartMC (case-sensitive).","severity":"gotcha","affected_versions":"all"},{"fix":"Check documentation for current API.","message":"Some older functions (e.g., AeroData.from_json) may be removed in future versions. Check the changelog for deprecation notices.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install pypartmc' and then 'import PyPartMC'.","cause":"The Python module is named 'PyPartMC', but package is 'pypartmc'. You may have installed the wrong package or used wrong import.","error":"ImportError: No module named PyPartMC"},{"fix":"Use 'import PyPartMC'.","cause":"Common mistake: trying to import 'partmc' instead of 'PyPartMC'.","error":"ModuleNotFoundError: No module named 'partmc'"},{"fix":"Provide complete species_data for each species, e.g., ppmc.AeroData.species_data('SO4', density=1.8, kappa=0.5).","cause":"AeroData species definitions must include all properties (density, kappa). Missing or misnamed species cause this.","error":"ValueError: species 'SO4' not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}