[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] Proposed bonded/nonbonded list interfaces



Daniel Russel wrote:
Since I needed caching of my bonds so I decided to refactor things to have bonded and nonbonded lists. Here are my proposed interfaces for people's perusal. I then have a DynamicExclusionVolumeRestraint and DynamicBondRestraint which take pointers to these states and get their particle pairs from them.

The interfaces look reasonable to me. But the list of bonded particles should be static, IMHO - it's a waste to rebuild it at every score evaluation - since it'll only change if you add/remove particles or bonds. But I guess that's an implementation detail.

I don't know the best way to make things accessible from python (I don't think the C++ iterators will work from python, but I haven't tried).

I think we can punt on that. Anybody foolish enough to write a nonbonded term in Python is going to have to put up with incredibly slow performance anyway, so they may as well just do an NxN double loop.

For reference, a BondDecorator is a decorator wrapping a particle which contains information (length, stiffness, type) for a bond.

This is the only thing I have a problem with. What do these three parameters mean? I guess length and stiffness translate to the mean and standard deviation of a Gaussian restraint. But this isn't the best place to put this kind of thing - what if the user wanted to use a cubic spline instead? A bond generally just identifies a pair of atoms, and the restraint contains the length/stiffness/whatever information. This could in turn be populated from your force field (e.g. using atom types).

	Ben
--
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle