Skip to content

Instantly share code, notes, and snippets.

@rmatsum836
Created June 24, 2020 18:43
Show Gist options
  • Save rmatsum836/7a6b8e96b73d5adb621a4c4112b1b5a5 to your computer and use it in GitHub Desktop.
Save rmatsum836/7a6b8e96b73d5adb621a4c4112b1b5a5 to your computer and use it in GitHub Desktop.
import mbuild as mb
import foyer
import antefoyer
alkane = mb.load('CCCC', smiles=True)
packing_box = mb.Box([5, 5, 5])
# Initialize gaff force field
gaff = foyer.forcefields.load_GAFF()
structure = gaff.apply(alkane)
structure_charge = antefoyer.ante_charges(structure, 'bcc', net_charge=0.00, multiplicity=1)
structure.save('init.gro', combine='all', overwrite=True)
structure.save('init.top', combine='all', overwrite=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment