Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple library for gro files

Project Description

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


pip install groio


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/

Release History

This version
History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(6.3 kB) Copy SHA256 Hash SHA256
2.7 Egg Sep 11, 2015
(207.7 kB) Copy SHA256 Hash SHA256
Source Sep 11, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting