julien
unread,Nov 10, 2010, 7:15:51 AM11/10/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sire Developers
Hi Chris,
There is a problem with the property "alpha". The following is an
ipython session where I inspect the contents of system after the
script bind.py has been executed.
In [1]: run ../../bind.py 2.00
### Starting script on local ###
New run. Loading input and creating restart
Lambda is 2.000
Applying flexibility and zmatrix templates...
Creating force fields...
Setting up moves...
Generated random seed number 970686
Saving restart
Loading required Sire Python modules...............Done!
Loaded a restart file on wich we have performed 0 moves.
Setup took 22 s
Performing simulation for block number 1
Simulation took 24 s
In [2]: system.constantComponents()
Out[2]:
{ lambda == 2, lambda_coul == 1, lambda_coul_b == 0.999, lambda_coul_f
== 1
lambda_lj == 1, lambda_lj_b == 1, lambda_lj_f == 1 }
In [3]: lam = Symbol("lambda")
In [4]: system.setComponent(lam, 3.0)
In [5]: system.constantComponents()
Out[5]:
{ lambda == 3, lambda_coul == 1, lambda_coul_b == 1, lambda_coul_f ==
1
lambda_lj == 1, lambda_lj_b == 1, lambda_lj_f == 1 }
In [6]: system.properties()
Out[6]:
Properties(
space => PeriodicBox( ( 65.6399, 61.9639, 61.393 ) ),
ljPower => 1,
coulombPower => 0,
alpha0 => 0,
alpha1 => 0,
alpha2 => 0,
alpha3 => 0,
strict => true,
alpha4 => 0,
alpha => 0,
shiftDelta => 2,
alpha5 => 0,
combiningRules => arithmetic,
shiftElectrostatics => false,
switchingFunction => HarmonicSwitchingFunction( elec = 10 A, vdw =
10 A, feather: elec = 9.5 A, vdw = 9.5 A )
)
In [7]: system.setComponent(lam, 1.0)
In [8]: system.constantComponents()
Out[8]:
{ lambda == 1, lambda_coul == 0, lambda_coul_b == 0, lambda_coul_f ==
0.001
lambda_lj == 1, lambda_lj_b == 0.999, lambda_lj_f == 1 }
In [9]: system.properties()
---------------------------------------------------------------------------
UserWarning Traceback (most recent call
last)
/home/julien/projects/siresims/tests/bind/bind.py in <module>()
----> 1
2
3
4
5
UserWarning: Exception 'SireBase::missing_property' thrown by the
thread 'master'.
None of the contained forcefields have a property called alpha.
Available properties are [ space, ljPower, coulombPower, alpha0,
alpha1, alpha2, alpha3, strict, alpha4, alpha, shiftDelta, alpha5,
combiningRules, shiftElectrostatics, switchingFunction ].
Thrown from FILE: /home/julien/software/devel/sire/corelib/src/libs/
SireFF/forcefields.cpp, LINE: 3687, FUNCTION: const
SireBase::Property& SireFF::ForceFields::property(const QString&)
const
__Backtrace__
( 0) /home/julien/local/lib/libSireError.so.0 ([0x2c9c59] ++0x29)
-- SireError::getBackTrace()
( 1) /home/julien/local/lib/libSireError.so.0 ([0x2c6bd0] ++0x90)
-- SireError::exception::exception(QString, QString)
/home/julien/local/lib/libSireFF.so.0(+0xe0856) [0x3b79856]
( 3) /home/julien/local/lib/libSireFF.so.0 ([0x3b56a6b] ++0x82b)
-- SireFF::ForceFields::property(QString const&) const
( 4) /home/julien/local/lib/libSireFF.so.0 ([0x3b5812e] ++0xbe)
-- SireFF::ForceFields::properties() const
( 5) /home/julien/local/lib/libSireSystem.so.0 ([0x2409b12] ++0x32)
-- SireSystem::System::properties() const
/home/julien/local/lib/python2.6/site-packages/Sire/System/
_System.so(+0xb2879) [0x1cd3879]
( 7) /usr/lib/libboost_python-py26.so.1.40.0 ([0x298edf] ++0x26f)
-- boost::python::objects::function::call(_object*, _object*) const
/usr/lib/libboost_python-py26.so.1.40.0(+0x2b117) [0x299117]
( 9) /usr/lib/libboost_python-py26.so.1.40.0 ([0x2a0402] ++0x62)
-- boost::python::detail::exception_handler::operator()
(boost::function0<void> const&) const
/home/julien/local/lib/python2.6/site-packages/Sire/Error/
_Error.so(+0x20db) [0x2160db]
( 11) /usr/lib/libboost_python-py26.so.1.40.0 ([0x2a03e1] ++0x41)
-- boost::python::detail::exception_handler::operator()
(boost::function0<void> const&) const
/home/julien/local/lib/python2.6/site-packages/Sire/Error/
_Error.so(+0x2075) [0x216075]
( 13) /usr/lib/libboost_python-py26.so.1.40.0 ([0x2a01d3] ++0x43)
-- boost::python::handle_exception_impl(boost::function0<void>)
/usr/lib/libboost_python-py26.so.1.40.0(+0x27c66) [0x295c66]
( 15) /usr/bin/python ([0x806245a] ++0x4a)
-- PyObject_Call
( 16) /usr/bin/python ([0x80e0471] ++0x3c71)
-- PyEval_EvalFrameEx
( 17) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 18) /usr/bin/python ([0x80e2907] ++0x57)
-- PyEval_EvalCode
( 19) /usr/bin/python ([0x80e1c0d] ++0x540d)
-- PyEval_EvalFrameEx
( 20) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 21) /usr/bin/python ([0x80e0c8b] ++0x448b)
-- PyEval_EvalFrameEx
( 22) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 23) /usr/bin/python ([0x80e0c8b] ++0x448b)
-- PyEval_EvalFrameEx
( 24) /usr/bin/python ([0x80e1bb0] ++0x53b0)
-- PyEval_EvalFrameEx
( 25) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 26) /usr/bin/python ([0x80e0c8b] ++0x448b)
-- PyEval_EvalFrameEx
( 27) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 28) /usr/bin/python ([0x80e0c8b] ++0x448b)
-- PyEval_EvalFrameEx
( 29) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 30) /usr/bin/python ([0x80e0c8b] ++0x448b)
-- PyEval_EvalFrameEx
( 31) /usr/bin/python ([0x80e2807] ++0x857)
-- PyEval_EvalCodeEx
( 32) /usr/bin/python ([0x80e2907] ++0x57)
-- PyEval_EvalCode
( 33) /usr/bin/python ([0x81005ad] ++0x12d)
-- PyRun_FileExFlags
( 34) /usr/bin/python ([0x8100812] ++0xc2)
-- PyRun_SimpleFileExFlags
( 35) /usr/bin/python ([0x805de5c] ++0xadc)
-- Py_Main
( 36) /usr/bin/python ([0x805d03b] ++0x1b)
-- main
( 37) /lib/tls/i686/cmov/libc.so.6 ([0x47fbd6] ++0xe6)
-- __libc_start_main
/usr/bin/python() [0x805cf81]
__EndTrace__
In [10]:
In [11]: system.setComponent(lam, 3.0)
In [12]: system.properties()
Out[12]:
Properties(
space => PeriodicBox( ( 65.6399, 61.9639, 61.393 ) ),
ljPower => 1,
coulombPower => 0,
alpha0 => 0,
alpha1 => 0,
alpha2 => 0,
alpha3 => 0,
strict => true,
alpha4 => 0,
alpha => 0,
shiftDelta => 2,
alpha5 => 0,
combiningRules => arithmetic,
shiftElectrostatics => false,
switchingFunction => HarmonicSwitchingFunction( elec = 10 A, vdw =
10 A, feather: elec = 9.5 A, vdw = 9.5 A )
)
The error "Exception 'SireBase::missing_property'" is raised only if
lambda is between 0 and 2. This is probably because a lambda value
between 0..2 causes the values of lambda_lj and lambda_coul (and
associated forwards and backwards lambdas) to change in the interval
0..1 which in turns should affect the alpha0 to alpha5 properties used
in the soft core force field. If lambda is > 2 or < 0, then lambda_lj
and lambda_coul do not change, and neither the alphaX values then.
( Note that I have modified bind.py somewhat to get this behavior.
Previous versions could have lambda_coul and lambda_lj < 0 or > 1).
What is the property "alpha" and why is it needed in addition to the
alphaX properties ?
Also, there seem to be a few other problems with the manipulation of
forcefields, for instance
In [49]: ffs = system.forceFields()
In [50]: ffs.forceFields()
Out[50]:
---------------------------------------------------------------------------
ArgumentError Traceback (most recent call
last)
/home/julien/projects/siresims/tests/bind/bind.py in <module>()
----> 1
2
3
4
5
/usr/lib/pymodules/python2.6/IPython/Prompts.pyc in __call__(self,
arg)
550
551 # and now call a possibly user-defined print
mechanism
--> 552 manipulated_val = self.display(arg)
553
554 # user display hooks can change the variable to be
stored in
/usr/lib/pymodules/python2.6/IPython/Prompts.pyc in _display(self,
arg)
576 return IPython.generics.result_display(arg)
577 except TryNext:
--> 578 return self.shell.hooks.result_display(arg)
579
580 # Assign the default display method:
/usr/lib/pymodules/python2.6/IPython/hooks.pyc in __call__(self,
*args, **kw)
139 #print "prio",prio,"cmd",cmd #dbg
140 try:
--> 141 ret = cmd(*args, **kw)
142 return ret
143 except ipapi.TryNext, exc:
/usr/lib/pymodules/python2.6/IPython/hooks.pyc in result_display(self,
arg)
169
170 if self.rc.pprint:
--> 171 out = pformat(arg)
172 if '\n' in out:
173 # So that multi-line strings line up with the left
column of
/usr/lib/python2.6/pprint.pyc in pformat(self, object)
109 def pformat(self, object):
110 sio = _StringIO()
--> 111 self._format(object, sio, 0, 0, {}, 0)
112 return sio.getvalue()
113
/usr/lib/python2.6/pprint.pyc in _format(self, object, stream, indent,
allowance, context, level)
127 self._readable = False
128 return
--> 129 rep = self._repr(object, context, level - 1)
130 typ = _type(object)
131 sepLines = _len(rep) > (self._width - 1 - indent -
allowance)
/usr/lib/python2.6/pprint.pyc in _repr(self, object, context, level)
221 def _repr(self, object, context, level):
222 repr, readable, recursive = self.format(object,
context.copy(),
--> 223 self._depth,
level)
224 if not readable:
225 self._readable = False
/usr/lib/python2.6/pprint.pyc in format(self, object, context,
maxlevels, level)
233 and whether the object represents a recursive
construct.
234 """
--> 235 return _safe_repr(object, context, maxlevels, level)
236
237
/usr/lib/python2.6/pprint.pyc in _safe_repr(object, context,
maxlevels, level)
309 level += 1
310 for o in object:
--> 311 orepr, oreadable, orecur = _safe_repr(o, context,
maxlevels, level)
312 append(orepr)
313 if not oreadable:
/usr/lib/python2.6/pprint.pyc in _safe_repr(object, context,
maxlevels, level)
318 return format % _commajoin(components), readable,
recursive
319
--> 320 rep = repr(object)
321 return rep, (rep and not rep.startswith('<')), False
322
ArgumentError: Python argument types in
IntraCLJFF.__repr__(IntraCLJFF)
did not match C++ signature:
__repr__(SireFF::Intra2B3DFF<SireMM::CLJPotentialInterface<SireMM::IntraCLJPotential>
>)
Some forcefields can return a string representation
In [53]: ffs.forceFields()[0]
Out[53]: SireMM::InternalFF("solute_intraff", version=43)
but IntraCLJPotential, InterCLJPotential, InterSoftCLJPotential do
not.