{"id":23098,"library":"freud-analysis","title":"freud","description":"Freud is a Python library for powerful, efficient trajectory analysis in scientific Python, targeting molecular dynamics and particle-based simulations. Version 3.5.0 supports Python >=3.12, uses abi3 wheels, and is released on a regular cadence (quarterly or more).","status":"active","version":"3.5.0","language":"python","source_language":"en","source_url":"https://github.com/glotzerlab/freud","tags":["molecular-dynamics","trajectory-analysis","particle-simulation","rdf","voronoi"],"install":[{"cmd":"pip install freud-analysis","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for array operations and type conversion.","package":"numpy","optional":false},{"reason":"Used for spatial computations like Voronoi tesselation.","package":"scipy","optional":true},{"reason":"Required for plotting methods (e.g., PMFTXY.plot).","package":"matplotlib","optional":true},{"reason":"Intel TBB for parallel acceleration (used if available).","package":"tbb","optional":true},{"reason":"Optional for reading HOOMD-blue GSD trajectory files.","package":"gsd","optional":true}],"imports":[{"note":"Top-level package. Use freud.box, freud.density, freud.order etc.","wrong":"from freud import ...","symbol":"freud","correct":"import freud"},{"note":"Box is a class in freud.box module.","wrong":"import freud.box.Box","symbol":"Box","correct":"from freud.box import Box"},{"note":"RDF is in freud.density, not top-level.","wrong":"from freud import RDF","symbol":"RDF","correct":"from freud.density import RDF"},{"note":"NeighborList is in freud.locality.","wrong":"import freud.NeighborList","symbol":"NeighborList","correct":"from freud.locality import NeighborList"}],"quickstart":{"code":"import freud\nimport numpy as np\n\n# Create a simulation box and random points\nbox = freud.box.Box.cube(10.0)\npoints = np.random.uniform(-5, 5, (100, 3))\n\n# Compute radial distribution function\nrdf = freud.density.RDF(bins=100, r_max=5.0)\nrdf.compute(system=(box, points))\nprint(rdf.r, rdf.rdf)\n\n# Compute neighbors\nnlist = freud.locality.LinkCell().compute(system=(box, points), num_neighbors=6)\nprint(nlist.nlist.id_i, nlist.nlist.id_j)","lang":"python","description":"Create a box, random points, compute RDF and neighbor list."},"warnings":[{"fix":"Use 'normalization_mode' instead of 'normalize'.","message":"In freud v3.0.0, the 'normalize' argument to freud.density.RDF was renamed to 'normalization_mode'.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pass orientation vectors (shape (N,3)) instead of quaternions (shape (N,4)).","message":"In freud v3.0.0, freud.order.Nematic uses orientation vectors instead of quaternions. Old code using quaternions will break.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use freud.order.Translational? (no direct replacement, check documentation).","message":"freud v3.0.0 removed freud.order.Translational. It was already deprecated.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use Python 3.12+.","message":"Support for Python 3.8, 3.9, 3.10, 3.11 removed in freud v3.5.0 (requires >=3.12).","severity":"deprecated","affected_versions":">=3.5.0"},{"fix":"Upgrade to v2.13.0+ or keep a reference to the compute object.","message":"NeighborList from certain compute objects may become invalid if the compute object is garbage collected (fixed in v2.13.0).","severity":"gotcha","affected_versions":"<2.13.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install freud-analysis","cause":"Package name is 'freud-analysis' on PyPI, not 'freud'.","error":"ModuleNotFoundError: No module named 'freud'"},{"fix":"from freud.box import Box","cause":"Box is in freud.box submodule, not top-level.","error":"AttributeError: module 'freud' has no attribute 'Box'"},{"fix":"Replace normalize=True with normalization_mode='default' (or other valid mode).","cause":"In freud v3.0.0, 'normalize' was renamed to 'normalization_mode'.","error":"TypeError: RDF.compute() got an unexpected keyword argument 'normalize'"},{"fix":"Pass orientation vectors (e.g., directors) of shape (N,3).","cause":"freud.order.Nematic in v3.0.0+ expects orientation vectors (N,3) instead of quaternions.","error":"ValueError: Shape mismatch: quaternion array must have shape (N,4)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}