Hello Gary--

> 
> 1.how do you ?write mixed python c /fortran based potentials using pypot?
> Specifically?I wanted to use c for calculating energies and derivatives but
> python for all other?set-up?house keeping etc

Probably the closest example to what you want to do is
python/h3JNCPot.py in recent distributions. Depending on the nature of
the numerical calculations, builtin Xplor-NIH or numpy code might be
fast enough. If not, you'll have to go through swig.

> 2. how can I access the non bonded list from c or fortran and from
> python?

There is no easy way to do this. Our experience is that all nonbond
lists are different- different update frequency, distance cutoff,
etc. We just roll our own when necessary. An example can be found in
xplor/nmrPot/nbTargetPot.cc

> 3. in PyPot based potentials is calcEnergy guaranteed to be called before
> calcEnergyAndDerivs as shown in the example you give in the documentation
> 

No. calcEnergy *can* be called separately (for instance, in Monte
Carlo algorithms) so that expensive gradient calculations aren't made,
calcEnergyAndDerivs must return an energy. One option is for
calcEnergyAndDerivs to call calcEnergy.

I hope this helps--
Charles

-------------- next part --------------
--
Charles Schwieters     email:   Charles at Schwieters.org
                       www:     http://schwieters.org/cds
phone: (301) 402-4914  PGP key: http://schwieters.org/cds/pgp.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : 
http://dcb.cit.nih.gov/pipermail/xplor-nih/attachments/20120208/8f8799d6/attachment.bin
 

Reply via email to