Skip to content

Instantly share code, notes, and snippets.

@yueyericardo
Created February 9, 2022 20:29
Show Gist options
  • Save yueyericardo/598a7ee9ca17157f61cca562061db2e8 to your computer and use it in GitHub Desktop.
Save yueyericardo/598a7ee9ca17157f61cca562061db2e8 to your computer and use it in GitHub Desktop.
from openmm.app import *
from openmm import *
from openmm.unit import *
from simtk import openmm, unit
from openmmtools import testsystems
water_box = testsystems.WaterBox(box_edge=20.0*unit.nanometer)
positions = water_box.positions
atoms = list(water_box.topology.atoms())
elements = [a.element.symbol for a in atoms]
PDBFile.writeFile(water_box.topology, positions, open('water-20.pdb', 'w')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment