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

Re: [modeller_usage] Python command



John Penniston wrote:
I'm trying to find the command which corresponds to SET DYNAMIC_COULOMB = ON. It seems to me that it should be energy_data.dynamic_coulomb = True, but when I try this, my log shows DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER : T T F F T;
I interpret this to mean that it is off.

When I use a top command file, I get:
DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER : T T T F T
indicating that it is on. How do I get this to happen using a Python file?

energy_data.dynamic_coulomb sets a class variable, rather than an instance variable, and because of the way Python integrates with Fortran, this won't work for you. You probably want to avoid that anyway, because setting things globally like that can mess up protocols which aren't designed to work with electrostatics, like loop modeling. (But you'll be pleased to hear that in the next release of Modeller, it will work as you'd expect, if you want to do that.)

Anyway, to set the instance variable, you want to do something like:

env = environ()
env.edat.dynamic_coulomb = True
etc.

	Ben Webb, Modeller Caretaker
--
             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage