Skip to main content

A Python library for PLUMED-style colvar files

Project description

A Python package to read and write PLUMED colvar files.

  • Free software: MIT license

Installation

You can either install via pip:

pip install colvar-toolkit

Or install from the repository:

pip install git+https://github.com/k9cdt/colvar-toolkit.git

Example usage

Basic read/write operations:

from cvtoolkit 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:

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colvar_toolkit-0.2.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colvar_toolkit-0.2.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file colvar_toolkit-0.2.0.tar.gz.

File metadata

  • Download URL: colvar_toolkit-0.2.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for colvar_toolkit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b4e1d334310ce307ccce93dfed5140c206f7eee59ccca62dcbccaa74cefc45cc
MD5 74421b653cee90101525ed1d1a09678f
BLAKE2b-256 06680144d8b8adf0d6c9b4b54f0b17b487a7d9982884af3723d94258158f9dc9

See more details on using hashes here.

File details

Details for the file colvar_toolkit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: colvar_toolkit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for colvar_toolkit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a55794bf1c71fe65f43e0f9c0acfc5754a44145590bc3a72ed39a60c8edf0ed0
MD5 efc41cb224f952097b64937430012496
BLAKE2b-256 4fbb32366c0857a0f4132046800e95430488ad66be53b2d53311b578da1b82fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page