compasses

This program, compasses, searches maximum, minimum and saddle-point states of finite size dipole arrays (i.e. sets of compasses).

compasses' homepage is http://loto.sourceforge.net/compasses/ .

You can download a tar ball of compasses (compasses-X.YY.ZZ.tar.gz) from http://sourceforge.net/projects/loto/files/compasses/ .

Copying

compasses

Copyright (C) 2014 Takeshi Nishimatsu

compasses is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. You can copy, modify and redistribute compasses, but only under the conditions described in the GNU General Public License (the "GPL"). For more detail, see COPYING.

Installation instructions

Quick start

$./configure --help$ ./configure
$make$ make test
$evince examples/square/4x4-2.1669993154.eps$ gv     examples/square/4x4-2.1669993154.eps   # If you do not have evince, use gv.
$./configure FC=ifort --with-lapack=mkl  Requirements Preferables for developers • autoconf (version 2.61 or higher) • automake (version 1.10 or higher) How to use compasses compasses can read parameters from the standard input (stdin) as well as from the file(s) given by the argument(s). $ compasses < an_input_file
$cat an_input_file | compasses$ compasses input_file_1 input_file_2 input_file_3 ...


examples:

$compasses < 4x4$ compasses hex_with_center/hex03 hex_without_center/hex03
$compasses 4x4 4x4dia$ ls -1 4x4*
4x4
4x4+0.0814637120
4x4+0.0814637120.gp
4x4+0.0814637120.rotational
4x4+0.0814637120.xy
4x4+0.3772358527
4x4+0.3772358527.gp
4x4+0.3824498212
:
4x4.forcematrix


When your input file was foo, you will get foo and foo.gp, where is the interaction energy per dipole. foo has data of position, strength and direction of dipoles. foo.gp is a GNUPLOT script. When it was a z=0 problem, i.e. a problem of compasses on a table, you will also get foo.rotational, foo.xy. foo.rotational contains eigenvalues and eigenvectors of the rotational-angular expression. foo.xy has interaction energy around the extremum along two "directions". In the file foo.forcematrix, the forcematrix and its eigenvectors and eigenvalues are written. Note that eigenvectors and eigenvalues of the forcematrix are MEANINGLESS. But the eigenvectors are used as initial guesses.

You can visualize the results by executing the GNUPLOT scripts, then you will get EPS files. To get beautiful EPS files, you have to edit and adjust some plotting parameters in your GNUPLOT scripts.

$compasses 4x4dia$ gnuplot 4x4dia-1.8693735707.gp


How to write an input file

The input file for compasses is a text file consisting of comment lines and 'tag = value(s)' lines.

Comment

Lines beginning with '#' are ignored. Blank lines are also ignored.

# This is a comment line.

# Here are two more
# comment lines.


Tags

tag = value(s)

You must put ' = ', space-equal-space, between tag and value(s) as:

tag = 1.0

tag = -2.0 -3.0 -4.0
tag =  5.0  6.0  7.0


Followings are currently available tags.

Descriptions of tags

title
title = 'Example Title'
title = 'Example for the enhanced postscript terminal in gnuplot:  {/Times-Italic a}_1'

dipole

position, [strength], [initial direction] of a dipole.

example:

dipole = 1.0 0.0 0.0
dipole = 1.0 1.0 0.0  2.0
dipole = 1.0 2.0 0.0  1.0  1.0 0.0 0.0

dumping

Dumping factor for steady minimization. Lager positive dumping factor may achieve faster convergence to the extrema, but may possibly fall into an oscillation in the updating scheme. Its default is 0.1.

example:

dumping = 0.2


Output files

STDOUT

To STDOUT, compasses outputs input parameters, the number of dipoles (n_dipoles), and calculated N*3+1 kinds of interaction energy. If positions and directions of dipoles are restricted in a z=0 flat 2-dimensional area, compasses reports whether the system is minimum, maximum or saddle state. Otherwise 'z' will be reported.

\$ compasses 4x4
title = '4x4 dipole square lattice'

dipole =    0.0000000000000000    0.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    1.0000000000000000    0.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    2.0000000000000000    0.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    3.0000000000000000    0.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00

dipole =    0.0000000000000000    1.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    1.0000000000000000    1.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    2.0000000000000000    1.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    3.0000000000000000    1.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00

dipole =    0.0000000000000000    2.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    1.0000000000000000    2.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    2.0000000000000000    2.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    3.0000000000000000    2.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00

dipole =    0.0000000000000000    3.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    1.0000000000000000    3.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    2.0000000000000000    3.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
dipole =    3.0000000000000000    3.0000000000000000    0.0000000000000000  1.00  0.00  0.00  0.00
n_dipoles =  16
-2.1669993154 [interaction energy / dipole]  min           1 th eigenvalue =   -4.3659566912
-1.9673746064 [interaction energy / dipole]  saddle        2 th eigenvalue =   -4.3359322790
-1.9757644501 [interaction energy / dipole]  min           3 th eigenvalue =   -4.1086111417
-1.9757644501 [interaction energy / dipole]  min           4 th eigenvalue =   -4.1086111417
-1.9839701948 [interaction energy / dipole]  min           5 th eigenvalue =   -4.0806985789
:
-1.0931513536 [interaction energy / dipole]  z            12 th eigenvalue =   -2.3121735492
:
+2.3863435230 [interaction energy / dipole]  max          49 th eigenvalue =    0.0000000000


foo.forcematrix

The force matrix.

foo-x.xxxxxxxxxx

Calculated configurations of dipoles, where -x.xxxxxxxxxx or +x.xxxxxxxxxx is the interaction energy per dipole.

foo-x.xxxxxxxxxx.gp

A gnuplot script for that state.

foo-x.xxxxxxxxxx.rotational

The NxN interaction energy matrix in rotational-angular expression around the extremum is given, if positions and directions of dipoles are restricted in a z=0 flat 2-dimensional area.

foo-x.xxxxxxxxxx.xy

interaction energy along two "directions" around the extremum.

Examples

compasses can also minimize interaction energy of a 0-dimensional finite-size system consisting of fixed-amplitude dipoles.

4x4 dipole square array

Figure: The maximum state (a), saddle-point states (b) and (c), and minimum states (d)-(f) for the 4 × 4 square array. (f) is the ground states. Below each panel, averaged interaction energy per dipole is indicated. In the idealized system, the dipoles are points at each center of circle. Here, we emphasize the directions of dipoles and their packings with arrows and circles.

Interaction energy per dipole around the saddle-point state (b) along two "directions" are plotted.

20x20 dipole square array

Input file: examples/square/20x20

Figure: Ground state of the 20x20 dipole square array.

finite-size triangular arrays

(a) (b)
Figure: Dipoles in two kinds of finite-size triangular arrays; (a) with a central dipole and (b) without a central dipole. The existence of central dipole breaks the 6-fold symmetry.

2x2x2 dipole array

Input file: examples/square/2x2x2

Mailing list

• Description: Discussions and announcements of loto, feram and compasses programs
• Subscribe: https://lists.sourceforge.net/lists/listinfo/loto-feram-compasses-ml