diff --git a/README.md b/README.md index 1cabdcce56cd56644c92af110b940055a756bf57..2b4515e849431993ba2993186b30b466e1cddbce 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() ```