Metadata-Version: 2.4
Name: colvar-toolkit
Version: 0.1.0
Summary: A Python library for PLUMED-style colvar files
Author-email: Da Teng <tengda1997@gmail.com>
Maintainer-email: Da Teng <tengda1997@gmail.com>
License: MIT license
Project-URL: bugs, https://github.com/k9cdt/colvar/issues
Project-URL: homepage, https://github.com/k9cdt/colvar
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

PLUMED colvar
******************

A Python package to read and write PLUMED colvar files.

* Free software: MIT license

Example usage
-----------------

Basic read/write operations:

.. code-block:: python

    from colvar import Colvar

    # Read a colvar file
    cv = Colvar.from_file('colvar.dat')

    # Access data
    bias = cv["metad.bias"]
    cv["metad.rct"] = my_array
    del cv["metad.acc"]

    # Write a new colvar file
    cv.write('new_colvar.dat')

Joining two files, and column-wise actions:

.. code-block:: python

    cv1 = Colvar.from_file('colvar1.dat')
    cv2 = Colvar.from_file('colvar2.dat')
    cv3 = Colvar.from_file('colvar3.dat').choose("rmsd")

    # Append time-wise
    # Throws an error if cv2 does not have all keys in cv1
    cv1.tappend(cv2)

    # Append key-wise
    # Throws an error if number of rows don't match
    cv1.kappend(cv3)
