Skip to content

This is the new molecular nodes file#1

Open
lilyhg wants to merge 1 commit intomainfrom
blender-molecular-node
Open

This is the new molecular nodes file#1
lilyhg wants to merge 1 commit intomainfrom
blender-molecular-node

Conversation

@lilyhg
Copy link
Owner

@lilyhg lilyhg commented Jul 14, 2023

I'm really not sure about the def main part of the app.py function. Here is the original thing I had that I had ChatGPT modify to fit in with the formatting of the pervious one:

def main():
    addon_path = "/Users/path/to/MolecularNodes.zip"
    install_addon(addon_path)
    install_biotite()
    delete_existing_objects()

    local_path = '/Users/path/to/protein'
    local_name = 'PROTEIN NAME'
    include_bonds = True
    center = False
    del_solvent = True
    default_style = 1
    set_import_properties(local_path, local_name, include_bonds, center, del_solvent, default_style)

    import_protein_local()
    set_render_engine('CYCLES')
    enable_gpu_rendering()

    lowest_empty, bbox_cos_global = create_empty_objects()
    camera = add_camera(sum(bbox_cos_global, Vector()) / 8)
    set_background_color((0, 0, 0, 1))
    add_plane_below(lowest_empty)
    add_point_light((0, 0, 0), 15.0)

    output_path = "/Users/path/to/output"
    output_filename = "render_output.png"
    set_render_output(output_path, output_filename)
    render_scene()

    output_filepath = os.path.join(output_path, output_filename)
    print("Rendered image saved to:", output_filepath)

if __name__ == '__main__':
    main()

I'm also not sure if I'm calling(?) MolecularNodes correctly in app.py

I'm really not sure about the def main part of the app.py function. Here is the original thing I had that I had ChatGPT modify to fit in with the formatting of the pervious one:

```
def main():
    addon_path = "/Users/path/to/MolecularNodes.zip"
    install_addon(addon_path)
    install_biotite()
    delete_existing_objects()

    local_path = '/Users/path/to/protein'
    local_name = 'PROTEIN NAME'
    include_bonds = True
    center = False
    del_solvent = True
    default_style = 1
    set_import_properties(local_path, local_name, include_bonds, center, del_solvent, default_style)

    import_protein_local()
    set_render_engine('CYCLES')
    enable_gpu_rendering()

    lowest_empty, bbox_cos_global = create_empty_objects()
    camera = add_camera(sum(bbox_cos_global, Vector()) / 8)
    set_background_color((0, 0, 0, 1))
    add_plane_below(lowest_empty)
    add_point_light((0, 0, 0), 15.0)

    output_path = "/Users/path/to/output"
    output_filename = "render_output.png"
    set_render_output(output_path, output_filename)
    render_scene()

    output_filepath = os.path.join(output_path, output_filename)
    print("Rendered image saved to:", output_filepath)

if __name__ == '__main__':
    main()
```
I'm also not sure if I'm calling(?) MolecularNodes correctly in app.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant