From 08616b0f6805fd544727c2f0090c872266330fbb Mon Sep 17 00:00:00 2001 From: Ivo Filot Date: Tue, 14 Nov 2023 13:32:24 +0100 Subject: [PATCH] Polishing example --- examples/blender_render.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/examples/blender_render.py b/examples/blender_render.py index a86cdab..2e2b7ac 100644 --- a/examples/blender_render.py +++ b/examples/blender_render.py @@ -15,8 +15,9 @@ outpath = os.path.dirname(__file__) def main(): - # build_orbitals_co() + build_orbitals_co() build_orbitals_ch4() + build_orbitals_ethylene() def build_orbitals_co(): """ @@ -44,6 +45,18 @@ def build_orbitals_ch4(): build(molname, res, resfb, nrows=3) +def build_orbitals_ethylene(): + """ + Build a montage image of the canonical and localized molecular orbitals + of CH4 + """ + molname = 'ethylene' + mol = MoleculeBuilder().from_name('ethylene') + res = GeometryOptimization().run(mol, 'sto3g')['data'] + resfb = FosterBoys(res).run() + + build(molname, res, resfb, nrows=2) + def build(molname, res, resfb, nrows=2): """ Build isosurfaces, montage and print energies to a file @@ -57,7 +70,7 @@ def build(molname, res, resfb, nrows=2): :param nrows: Number of rows in the montage :type nrows: int """ - #build_isosurfaces(molname, res, resfb) + build_isosurfaces(molname, res, resfb) montage(molname, nrows) store_energies(os.path.join(os.path.dirname(__file__), 'MO_%s_energies.txt' % molname), res['orbe'], resfb['orbe'])