From 09997385f20a08e6bf24718bb5cde704e2bfc992 Mon Sep 17 00:00:00 2001 From: Berk Onat <onatberk@gmail.com> Date: Tue, 31 Oct 2017 14:02:15 +0100 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1cabdcc..2b4515e 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,24 @@ Usage example: ```python import pymolfile -molfile = pymolfile.OpenMolfile('test/ala3.pdb') +moltopo = pymolfile.OpenMolfile('test/DPDP.pdb') -print(molfile.topology.structure) -print(molfile.topology.bonds) -print(molfile.topology.angles) +print(moltopo.topology.structure) +print(moltopo.topology.bonds) +print(moltopo.topology.angles) + +moltraj = pym.OpenMolfile('test/DPDP.nc', topology=moltopo) + + if moltraj.trajectory is not None: + step=0 + while True: + positions = moltraj.trajectory.iread() + if positions is not None: + print("STEP:",step) + print(positions) + step += 1 + else: + break -molfile_traj = molfile.trajectory.iread() ``` -- GitLab