{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-unified-framework-for-machine-learning","title":"A unified framework for machine learning collective variables for enhanced sampling simulations: $\\texttt{mlcolvar}$","arxiv_id":"2305.19980","date":"2023-05-31","proceeding":null,"authors":["Luigi Bonati","Enrico Trizio","Andrea Rizzi","Michele Parrinello"],"abstract":"Identifying a reduced set of collective variables is critical for understanding atomistic simulations and accelerating them through enhanced sampling techniques. Recently, several methods have been proposed to learn these variables directly from atomistic data. Depending on the type of data available, the learning process can be framed as dimensionality reduction, classification of metastable states or identification of slow modes. Here we present $\\texttt{mlcolvar}$, a Python library that simplifies the construction of these variables and their use in the context of enhanced sampling through a contributed interface to the PLUMED software. The library is organized modularly to facilitate the extension and cross-contamination of these methodologies. In this spirit, we developed a general multi-task learning framework in which multiple objective functions and data from different simulations can be combined to improve the collective variables. The library's versatility is demonstrated through simple examples that are prototypical of realistic scenarios.","url_abs":"https://arxiv.org/abs/2305.19980v2","url_pdf":"https://arxiv.org/pdf/2305.19980v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"a-unified-framework-for-machine-learning","repo_url":"https://github.com/luigibonati/mlcolvar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-unified-framework-for-machine-learning","repo_url":"https://github.com/jintuzhang/mlcolvar","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-unified-framework-for-machine-learning","repo_url":"https://github.com/luigibonati/mlcvs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.19980","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.19980"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/luigibonati/mlcvs","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/luigibonati/mlcolvar","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jintuzhang/mlcolvar","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":6,"ran":0,"repositories":1},"listed":{"samples":2,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"fd7952da412b1f96","entry":"compute_covariance","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/loss/generator_loss.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/loss/generator_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd7952da412b1f96"}},{"code_sha256_prefix":"c582c2d25ac35e3a","entry":"get_activation","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/nn/utils.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/nn/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c582c2d25ac35e3a"}},{"code_sha256_prefix":"d3dc6cad300a0ac1","entry":"mse_loss","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/loss/mse.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/loss/mse.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d3dc6cad300a0ac1"}},{"code_sha256_prefix":"161e915168203193","entry":"parse_nn_options","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/nn/utils.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/nn/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"161e915168203193"}},{"code_sha256_prefix":"f7515ced1f62c0e1","entry":"reduce_eigenvalues_loss","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/loss/eigvals.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/loss/eigvals.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f7515ced1f62c0e1"}},{"code_sha256_prefix":"dd4706e9d3e702d6","entry":"reduce_eigenvalues_loss","repo":"jintuzhang/mlcolvar","repo_kind":"listed","path":"mlcolvar/core/loss/eigvals.py","file_url":"https://github.com/jintuzhang/mlcolvar/blob/HEAD/mlcolvar/core/loss/eigvals.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd4706e9d3e702d6"}},{"code_sha256_prefix":"960137d6a2b39ed7","entry":"tda_loss","repo":"luigibonati/mlcolvar","repo_kind":"official","path":"mlcolvar/core/loss/tda_loss.py","file_url":"https://github.com/luigibonati/mlcolvar/blob/HEAD/mlcolvar/core/loss/tda_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"960137d6a2b39ed7"}},{"code_sha256_prefix":"46005db8034f843f","entry":"tda_loss","repo":"jintuzhang/mlcolvar","repo_kind":"listed","path":"mlcolvar/core/loss/tda_loss.py","file_url":"https://github.com/jintuzhang/mlcolvar/blob/HEAD/mlcolvar/core/loss/tda_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"46005db8034f843f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}