This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapenter - enter an N-body snapshot interactively into a file

Synopsis

snapenter [out=snapfile] [nbody=nbody] [time=time] [headline=string]

Description

snapenter interactively prompts the user for the basic data describing an N-body snapshot: masses, positions and velocities of each particles. The data are written into a file snap-file, in standard N-body snapshot(5NEMO) format. If not provided on the command line, snapenter will prompt for the name of snap-file and nbody, the number of particles.

To still enter snapshots interactively, but for a larger amount of bodies, the ‘‘205’’ format (see atos(1NEMO) ) can be used. An ascii file with masses, positions and velocities can be created with an editor, and atos(1NEMO) is used to convert this file to a proper snapshot(5NEM0) file.

The program tabtos(1NEMO) is probably more flexible even.

Coordinates are not transformed to the center-of-mass coordinate system, for this the program snapcenter(1NEMO) needs to be used.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
out=snap-file
Output data is written into snap-file, in standard snapshot format.
By default the user is prompted for the filename.
nbody=nbody
Number of particles nbody in Nbody snapshot.
By default the user is prompted for the number of bodies.q
time=time
Time at which the snapshot applies
Default: time=0.0.
headline=string
Optional headline, which is written as the first item in the snapshot file, the next item being the snapshot itself.
Default: no headline
verbose=t|f
In interactive mode you should set this to true, but in a case snapenter was used in a pipe (see EXAMPLE below), it cuts down a large number of messages.
Default: false]

Example

A cleverly formatted ASCII table can also be piped into snapenter, if they only contain masses, positions and velocities in the following format:

N
m1 x1 y1 z1 vx1 vy1 vz1
m2 x2 y2 z2 vx2 vy2 vz2
...
mN xN yN zN vxN vyN vzN

where the first number, N, is the number of particles. If that is not available in the file, specify it via the commandline as nbody=.

This also happens to be the output of snapprint(1NEMO) with the following options snapprint options=m,x,y,z,vx,vy,vz header=nbody

See Also

atos(1NEMO) , tabtos(1NEMO) , snapprint(1NEMO) , snapcenter(1NEMO) , snapshot(5NEMO)

Author

Piet Hut

Files


~/src/nbody/init    snapenter.c

History


28-Nov-86    V1.0: created             PIET
23-Apr-87    V1.1: created             PIET
10-Jun-88    V1.2: created             PIET
10-jul-89    V2.0: updated for new filestruct()    PJT
21-nov-90    V2.1: some defaults changed, NEMO 2.x    PJT
24-mar-94    added verbose= and the example    PJT


Table of Contents