Skip to content

Instantly share code, notes, and snippets.

@rmatsum836
Created June 24, 2020 20:39
Show Gist options
  • Save rmatsum836/318f83edf1f2e64d20d71e7f26ac5526 to your computer and use it in GitHub Desktop.
Save rmatsum836/318f83edf1f2e64d20d71e7f26ac5526 to your computer and use it in GitHub Desktop.
cation = mb.load('cation.mol2')
for idx, particle in enumerate(cation.particles()):
if idx == 0:
particle.name = 'C_E'
# Atom type system
# `structure` is a parmed structure
# Have to change the name or parmed will error when trying to save the structure
for atom in structure.atoms:
if atom.name == 'C_E':
atom.name = 'CE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment