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

Release files for groio 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for groio 1.0
File Size Uploaded
groio-1.0.tar.gz 207.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for groio 1.0
File Interpreter ABI Platform
groio-1.0-py2.7.egg Legacy Egg format - - Details

Total release size: 214.0 kB

Release files / groio-1.0.tar.gz

Download URL groio-1.0.tar.gz
Size 207.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5be4f558b5ac5566941f8caad898aac699042ff537e6b0e4cb4ef5577862d793
BLAKE2b-256 checksum
How to use checksums
51df0167fec121dfb8dc66b161a4c06efa4f8382ac242be90f4154a854a24004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / groio-1.0-py2.7.egg

Download URL groio-1.0-py2.7.egg
Size 6.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
39eaef13548e14e546801bd1d7aa871917b22994af3d0181cf962cb125d68816
BLAKE2b-256 checksum
How to use checksums
5793bd41b527f03e80664283dca1875977b7c6e71637cbfda107f5efdea3a8ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page