[Xplor-nih] error message
Marco Roeben
roeben at fmp-berlin.de
Wed Jun 20 08:41:07 EDT 2007
Hello,
thank you very much for this info! Everything's working great.
best regards
Marco
On Tuesday 19 June 2007 16:04, Charles at schwieters.org wrote:
> Hello Marco--
>
> > Is there an easy way to write the energies during the dynamic e.g. in a
> > csv file? So it would become very easy to make a graph out of them. One
> > of the molecular modelling guys here asked me this also a few days ago.
>
> sure. Place the definition of the PrintEnergyTraj class (below) before
> the structure calculation loop. Then at the beginning of structure
> calculation (in calcOneStructure in eginput/gb1_rdc/anneal.py)
> initialize the ivm object before high-temperature dynamics like
>
> dyn.setTrajectory( PrintEnergyTraj("energy.out",dyn) )
>
> on each line of energy.out are iteration number, time, potential and
> total energy.
>
> best regards--
> Charles
>
> class PrintEnergyTraj:
> """a trajectory object to be used with an <m ivm>.IVM object, used to
> print energy during a trajectory run.
> Use the IVM setTrajectory method to assign to view a given ivm
> trajectory.
> """
> def __init__(s,filename,ivm):
> """specify the filename to print energy in. The frequency of update
> is controlled via the saveInterval member (defaults to 1 [every frame]).
> """
> s.saveInterval = 1
> s.file=open(filename,"w")
> s.time=0
> s.ivm=ivm
> return
> def write(s,iter,stepsize):
> if iter%s.saveInterval != 0: return
>
> s.time += stepsize
> print >>s.file,iter,s.time,s.ivm.Epotential(), s.ivm.Etotal()
>
> return
--
Dipl. Chem. Marco Röben
Leibniz-Institut für Molekulare Pharmakologie Berlin (FMP)
Abt.: NMR-unterstützte Strukturforschung
Robert-Rössle-Str. 10
D-13125 Berlin
Tel: 030-94793224
Fax: 030-94793169
mail: roeben at fmp-berlin.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://dcb.cit.nih.gov/pipermail/xplor-nih/attachments/20070620/f25b3e10/attachment.bin
More information about the Xplor-nih
mailing list