In [1]:
import chemcoord as cc
Settings can be seen here:
In [2]:
cc.configuration.settings
Out[2]:
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
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]:
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]:
In [9]:
type(my_molecule.get_inertia()['transformed_Cartesian'])
Out[9]:
In [10]:
my_molecule.get_inertia()['transformed_Cartesian'].my_number_one_method()
Out[10]:
In [ ]: