[ghemical-devel] Extending ghemical

Tommi Hassinen Tommi.Hassinen at uku.fi
Thu Feb 19 02:57:25 EST 2009


From: ghemical-devel-bounces at bioinformatics.org [ghemical-devel-bounces at bioinformatics.org] On Behalf Of Jose R. Valverde [jrvalverde at cnb.csic.es]
Sent: Tuesday, February 17, 2009 2:08 PM
To: ghemical-devel at bioinformatics.org
Subject: [ghemical-devel] Extending ghemical

        I am trying to perform QMD with ghemical, and in the process I find
myself in need of extras which I can code myself.

        My questions are whether there is any documentation of the APIs -so
I can ensure I abide by conventions- and what is the procedure to revert back
any changes to the main branch.

        More specifically: control of trajectory replay speed is easy to code.
In my current implementation I check an environment variable (so as not to touch
ghemical user interface or command language). Is this acceptable? Should I read
a preferences file instead? I also need to control the frequency of data savings
for trajectories, which is also trivial to add. Same problem.


TH : Preferences file support is broken/non-existing right now. I would prefer a
preferences file over environment variables, so I should first add a baseline
preferences file implementation, which could then be extended...


        Then, I would like to add support for other QM engines. Is there any
documentation on what is exactly needed for this?


TH : The libghemical API does not have any reasonable documentation (so far).  :(
There are unit conventions that must be used : the distance unit is nanometer (nm)
and the energy unit is kilo-Joules per mole (kJ/mol). That's pretty much everything.

The design is that the molecular model information (atoms & bonds) are stored and
maintained in a "model" object, which is used to generate "engine" objects. Sounds
simple, but there is an extra layer of "setup" objects which may hold some extra
information (there are separate "setup" classes for MM and for QM models, plus some
extra stuff for coarse-grainded MM models which I'm working with myself now).

Adding new QM methods is

1) a most welcome effort !!!  :)
2) probably quite easy, since there are two examples to look at.

Please look carefully at eng1_qm class ; it's the base class you have to use,
and implement a new class like eng1_qm_your_new_stuff ; you have to implement
the methods for computing energies and other properties as defined in the base class.
Then finally we need to add some stuff into the setup1_qm class so that objects of
your new class can be created there as requested in ghemical/libghemical.

I hope this helps ; I'm happy to explain more if you have any questions.

Best Regards,
Tommi



More information about the ghemical-devel mailing list