Skip to main content
https://travis-ci.org/HubLot/groio.svg?branch=master https://coveralls.io/repos/HubLot/groio/badge.svg?branch=master&service=github

A library to handle the reading and writing of a gro file.

Installation

pip install groio

Usage

import groio

#Read a gro file
title, atoms, box = groio.parse_file("filin.gro")

#Write a gro file
with open("filout.gro", "w") as f:
    for line in groio.write_gro(title, output_atoms, box):
        print(line, end='', file=f)

#Renumber the atoms to avoid number above 100 000
atoms = groio.renumber(atoms)

The function parse_file returns :

  • title: the title of the system as written on line 1 of the file as a string

  • atoms: a list of atom, each atom is stored as a dictionary

  • box: the box description as written on the last line as a string

Run tests

Unit tests are available through nosetests python module.

nosetests tests/test_groio.py

Download files

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

Source Distribution

groio-1.0.tar.gz (207.7 kB view details)

Uploaded Source

Built Distribution

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

groio-1.0-py2.7.egg (6.3 kB view details)

Uploaded Egg

File details

Details for the file groio-1.0.tar.gz.

File metadata

  • Download URL: groio-1.0.tar.gz
  • Upload date:
  • Size: 207.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for groio-1.0.tar.gz
Algorithm Hash digest
SHA256 5be4f558b5ac5566941f8caad898aac699042ff537e6b0e4cb4ef5577862d793
MD5 b74ada6477590aed4b98201122a91614
BLAKE2b-256 51df0167fec121dfb8dc66b161a4c06efa4f8382ac242be90f4154a854a24004

See more details on using hashes here.

File details

Details for the file groio-1.0-py2.7.egg.

File metadata

  • Download URL: groio-1.0-py2.7.egg
  • Upload date:
  • Size: 6.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for groio-1.0-py2.7.egg
Algorithm Hash digest
SHA256 39eaef13548e14e546801bd1d7aa871917b22994af3d0181cf962cb125d68816
MD5 13ce736f26b626f420012e459f026ff3
BLAKE2b-256 5793bd41b527f03e80664283dca1875977b7c6e71637cbfda107f5efdea3a8ad

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0

Supported by

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