import chemcoord as cc
Settings can be seen here:
cc.configuration.settings
{'defaults': {'atomic_radius_data': 'atomic_radius_cc', 'use_lookup': False, 'viewer': 'gv.exe'}}
A configuration file can be written with:
cc.configuration.write_configuration_file('./example_configuration_file', overwrite=True)
%less example_configuration_file
It is read automatically during startup from '~/.chemcoordrc'
.
Otherwise it is possible to explicitly call cc.configuration.read_configuration_file(...)
!rm example_configuration_file
You can safely inherit from the classes in this module
class my_tailored_class(cc.Cartesian):
def my_number_one_method(self):
return 1
molecule = cc.Cartesian.read_xyz('MIL53_small.xyz')
type(molecule)
chemcoord.cartesian_coordinates.cartesian_class_main.Cartesian
Notice how all old methods from Cartesian return an object of your tailored class
my_molecule = my_tailored_class.read_xyz('MIL53_small.xyz')
type(my_molecule)
__main__.my_tailored_class
type(my_molecule.get_inertia()['transformed_Cartesian'])
__main__.my_tailored_class
my_molecule.get_inertia()['transformed_Cartesian'].my_number_one_method()
1