Skip to content

Instantly share code, notes, and snippets.

@twobob
Created June 29, 2022 12:59
Show Gist options
  • Save twobob/e605ebbcbf804cedcf1f2ecee2682e2a to your computer and use it in GitHub Desktop.
Save twobob/e605ebbcbf804cedcf1f2ecee2682e2a to your computer and use it in GitHub Desktop.
#GPT3 create a mogli xyz file for a hybrid ferrocene Cadmium telluride molecule.
molecule = Mogli.Molecule()
metal = Mogli.Atom()
metal.symbol = "Fe"
cyclopentadienyl = Mogli.Atom()
cyclopentadienyl.symbol = "Cp"
cyclopentadienyl.charge = -1
methyl = Mogli.Atom()
methyl.symbol = "CH3"
molecule.atoms.append(metal)
molecule.atoms.append(cyclopentadienyl)
molecule.atoms.append(methyl)
molecule.links.append(Mogli.Link(0, 1, 3))
molecule.links.append(Mogli.Link(1, 2, 1))
molecule.write_xyz("ferrocene_cadmium_telluride.xyz")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment