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

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



Daniel Russel wrote:
Ben Webb wrote:
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.
What do you mean by static? Only updated occasionally? You only call the set_particles method when the set of particles you care about changes.

I think that's what I said. ;) But yes, in most cases your set of particles will be set once and then never change. If you only update the bond list at set_particles() time rather than at update() time, that's fine with me.

I guess I should have been more careful in how I described things. The BondedState is oblivious to what is actually put in the BondDecorator.

Yes, that's what I figured you meant. It's not the BondedState I have a problem with.

It just passes some (unknown) information back (we could just pass back a Particle* instead). What is done with that information is up to the restraint that uses it. I have a restraint that just uses them to make a harmonic potential, but the restraints are trivial and new ones can be written easily.

Sure - I just think you're going to have a lot of trouble forcing all of the necessary information into this bond decorator. In the cubic spline case, that means a vector of floats, for example.

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