espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo] ESPResSo Digest, Vol 39, Issue 14


From: Axel Arnold
Subject: Re: [ESPResSo] ESPResSo Digest, Vol 39, Issue 14
Date: Mon, 30 Aug 2010 11:52:44 +0200
User-agent: KMail/1.10.3 (Linux/2.6.27.48-0.2-default; KDE/4.1.3; x86_64; ; )

On Saturday 28 August 2010 08:28:02 Steven R. Kirk wrote:
> > On Monday 23 August 2010 09:39:09 Steven R. Kirk wrote:
> >> Hello!
> >>
> >> I'm using tabulated potentials for calculating interactions between
> >> particles of a single species. I want to alter this potential mid-run,
> >> and I also want change the number of points where the new potential is
> >> tabulated (currently I get the error message:
> >>
> >> number of data points does not match the existing table
> >>
> >> )
> >>
> >> So can I do the following:
> >>
> >> inter 0 0 tabulated tab_pot1.dat
> >>
> >> Then later in the script do:
> >>
> >> inter 0 0 tabulated tab_pot2.dat
> >>
> >> ?
> >> Do I need to remove the first interaction before specifying the second?
> >> Are there any alternative means to achieve the same goal (if so, would
> >> be very grateful for details).
> >
> > Hi!
> >
> > I am not using tabulated potentials myself, but a quick scan of this code
> > shows that there is currently no way to change the number of points. The
> > reason is, that there is one table, in which all the tabulated values are
> > allocated, and if you would want to increase the number of points in one
> > of the stored potentials, then all the potentials stored afterwards would
> > need to be shifted, which simply isn't implemented and actually not so
> > easy.
> >
> > For your suggestion to delete the interaction: there is no way to delete
> > an interaction. There is a table of interaction parameters for pairs of
> > particles of certain types. Switching off a particular interaction simply
> > means to set its cutoff to 0, so that it is not used for this specific
> > pair of types. But there is no way to change the number of points in a
> > tabulated interaction back to 0.
> >
> > Axel
>
> Many thanks for your help Axel!
>
> How would I set the cutoff for a particular interaction to zero, once it
> has been loaded? The documentation for the inter command says that the
> outer cutoff for a potential is set by the maximum distance specified in
> the tabulated data.
>
> So once I call:
>
> inter 0 0 tabulated tab_pot1.dat
>
> then the only way I can change the cutoff is by, for example, later
> issuing the command
>
> setmd max_range 0.0
>
> Is this correct? If so, then I still can't switch from one potential to
> another in mid-run, since presumably max_range applies to *all*
> currently loaded interactions?

No, you cannot change the max_range by hand. The only way of switching off 
again a tabulated potential is by loading a new file with the same number of 
supporting points, but maximum specified distance 0. Consider that a bug of 
the current implementation of tabulated potentials.

> As an alternative way to achieve my goals, would it be possible to:
> 1. Save a checkpoint after the first phase (i.e. running with the first
> tabulated potential) that does not have the interaction information
> recorded in it, but contains all other parameters (positions +
> velocities+ temperature+ thermostat+ .....)
> 2. Close Espresso
> 3. Restart Espresso and immediately load in the checkpoint file
> 4. Define the new interaction by loading the new tabulated interaction
> data from a file
> 5. Continue integrating using the new potential
>
> I would be very grateful if you could confirm/refute this possibility.
> If you think it would work, could you suggest the syntax needed for the
> command needed to create and save the checkpoint file?

Yes, that would be a way to do it. I would actually not use checkpoints, but 
just record the relevant data using the blockfile command, which is rather 
easy and saves space. It basically looks like this:

set file [open "config.cfg" "w"]
blockfile $file write particles {id pos v}
close $file

which just writes positions and velocities. Since you have a script that sets 
up the connectivity, potential, thermostat etc, it is most likely easier not 
to store it in the checkpoint, but just use the same routine to set them up 
again. Alternatively, you can of course also use

blockfile $file write interactions
blockfile $file write thermostat

etc...

Axel

-- 
JP Dr. Axel Arnold Tel: +49 711 685 67609
ICP, Universität Stuttgart      Email: address@hidden
Pfaffenwaldring 27
70569 Stuttgart, Germany




reply via email to

[Prev in Thread] Current Thread [Next in Thread]