Giter Site home page Giter Site logo

Comments (3)

jvermaas avatar jvermaas commented on July 17, 2024

Pretty sure this is working as designed. If you source a .tcl script that loads a trajectory, it'll do exactly what the tcl script would do, and leave the trajectory loaded. Exit will get you out of the tcl interpreter, but since python is controlling VMD, there is still a molecule there for you to interact with. If you wanted to delete the molecule, you can just do that through the usual delete commands in Python or tcl.

from vmd-python.

Eigenstate avatar Eigenstate commented on July 17, 2024

@jvermaas is right, this is intended behavior. By having the TCL and Python interpreters operate in the same process, you can manipulate the same molecule with both languages in the same session using its molid.

To fix your memory leak you can delete the molecules you create when you're finished using them. You could also do this from the Python interface by deleting all loaded molecules in between calls to your TCL script:

from vmd import molecule

for molid in molecule.listall():
  molecule.delete(molid)

from vmd-python.

bc118 avatar bc118 commented on July 17, 2024

Thanks for the information. Have a good day

from vmd-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.