In [1]:
import chemcoord as cc

Settings

Settings can be seen here:


In [2]:
cc.configuration.settings


Out[2]:
{'defaults': {'atomic_radius_data': 'atomic_radius_cc',
  'use_lookup': False,
  'viewer': 'gv.exe'}}

A configuration file can be written with:


In [3]:
cc.configuration.write_configuration_file('./example_configuration_file', overwrite=True)

In [4]:
%less example_configuration_file

It is read automatically during startup from '~/.chemcoordrc'. Otherwise it is possible to explicitly call cc.configuration.read_configuration_file(...)


In [5]:
!rm example_configuration_file

Inheritance

You can safely inherit from the classes in this module


In [6]:
class my_tailored_class(cc.Cartesian):
    def my_number_one_method(self):
        return 1

In [7]:
molecule = cc.Cartesian.read_xyz('MIL53_small.xyz')
type(molecule)


Out[7]:
chemcoord.cartesian_coordinates.cartesian_class_main.Cartesian

Notice how all old methods from Cartesian return an object of your tailored class


In [8]:
my_molecule = my_tailored_class.read_xyz('MIL53_small.xyz')
type(my_molecule)


Out[8]:
__main__.my_tailored_class

In [9]:
type(my_molecule.get_inertia()['transformed_Cartesian'])


Out[9]:
__main__.my_tailored_class

In [10]:
my_molecule.get_inertia()['transformed_Cartesian'].my_number_one_method()


Out[10]:
1

In [ ]: