iNTERFACEWARE Products Manual > Installing and Using Chameleon > Using Python Scripting > Chameleon Python API > Environment Variable > Working With the Default Database |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
If database support is enabled, a VMD file may have a default database defined for it. This default database, if it exists, depends on the context in which the script is executed:
To connect to the default database, use the get_default_database() function. This function returns a database object representing the default database. If you use this function from within Iguana, the connection is inside a transaction envelope: any database actions performed by your Python scripts can be safely rolled back.
For examples that use this function, see Using the Database Object Methods and Getting and Setting Database Information. |