Skip to content

Instantly share code, notes, and snippets.

@rmatsum836
Created March 16, 2020 21:40
Show Gist options
  • Save rmatsum836/a1982f09652542788f2f48c934ba265f to your computer and use it in GitHub Desktop.
Save rmatsum836/a1982f09652542788f2f48c934ba265f to your computer and use it in GitHub Desktop.
il = mb.Compound()
solvent = mb.Compound()
for child in system.children:
if child.name in ['bmim', 'tf2n']:
il.add(mb.clone(child))
elif child.name == 'acn':
sollvent.add(mb.clone(child))
opls = Forcefield(name='oplsaa')
lopes = Forcefield('kpl.xml')
ilPM = lopes.apply(il, residues=['bmim', 'tf2n'])
solventPM = opls.apply(solvent, residues='acn')
system = ilPM + solventPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment