Custom system properties

4 views
Skip to first unread message

julien

unread,
Jun 19, 2012, 11:29:17 AM6/19/12
to sire-de...@googlegroups.com
Hi Chris,

I was wondering if you could help with this problem. I would like to write a python code that adds a new custom property to the system. The property should be a python array of list of atomic numbers with specified coordinates, e.g.

atomPos =  [  ( AtomNum(1), Vector(x1, y1, z1) ), .., ( AtomNum(2), Vector(x2, y2, z2) ) ]

I would like to be able to write in python:

system.setProperty("reference_positions", atomPos)

But this does not work as there is no suitable constructor

In [56]: system.setProperty("reference_positions", atomPos)
---------------------------------------------------------------------------
ArgumentError                             Traceback (most recent call last)

/scratch/julien/projects/confs/openmm/Sire_OpenMM_MD/methane-small/<ipython console> in <module>()

ArgumentError: Python argument types in
    System.setProperty(System, str, list)
did not match C++ signature:
    setProperty(SireSystem::System {lvalue}, SireFF::FFID ffid, QString name, SireBase::Property value)
    setProperty(SireSystem::System {lvalue}, QString name, SireBase::Property value)

Thus I was wondering

1) What needs to be done to be able to have this property for system ?

2) How would I access this property from C++ ?

Best wishes,


Reply all
Reply to author
Forward
0 new messages