Impressions ChemKrist-
Workshop 2013

Help - Commands

The GTECS3DGui is based on commands. That means you can do everything by using the command field. Allmost all commands hav the following form of usage.

command [property1=value1] [property2=value2] [...]

There are several commands you can use:

Command Properties
start -
close  
cls  
algo id: int or name:string
propertylist
replacenodes nodes: stringlist
reset  
setlock atom: string
type: string
value: bool (true,false,1,0)
setsize x: int
y: int
z: int
setucvisibility value: bool (0,1)
cmd: (rec, start, stop, sleep)
name: string
delay: int
rotation: 4 doubles/ints
translation: 3 doubles/ints
rotation: 4 doubles/ints
translation: 3 doubles/ints
 
 
nodes: stringlist
a: int
r: int
g: int
b: int
nodes: stringlist
axis: doublelist
center: doublelist (optional)
speed: rotationangle per frame

 

start

This command starts an instance of gtecs and connects it with the program. Only this command hasn't the property and value form. The -bequiet option disables that the structure is drawn.
Usage:
start [filename] [-bequiet]
filename: the path to the cif-file that should be opened by gtecs.
Example:

start ./data/gtecsstandard.cif -bequiet

close

Used to close the instance of gtecs3d.

cls

This command is used to clear the whole textoutput including the command-history.

algo

Executes a graph-algorithm with a specific id.
Usage:
algo id=(nr) property1=value1
algo name=(alogname) property1=value1
nr hast to be an integer value.
Example:
algo id=1
algo name=ReplaceCycles size=6
The first line executes the algorithm with id 1 (deletes all nodes with less or equal 1 neighbor).
The second one replaces cylces with size 6.

replacenodes

Replace the nodes of the property "nodes". It creates a marker at the midpoint of the nodes an connects it with all neighbors of the nodelist.
Usage:
replacenodes nodes=nodelist
The nodelist has to be in form of "atomname@unitcell,atomname2@unitcell,...".
Example:

replacenodes nodes=C2@0_0_0,C2_1@0_0_0,C2_3@0_1_0

reset

Resets the whole scene. This means the cif-file will be reinitialized.

setlock

With this command it is possible to lock atoms or whole atomtypes. So they can't be deleted by any algorithm.
Usage:
setlock atom=(atom) value=[true,false]
setlock type=(typename) value=[true,false]
atom: the name of the atom.
type: the name of the atomtype
value: true or false
Example:

lock atomname=C4_3 value=true

setsize

With this command it is possible to change the number ob unitcells shown in the scene.
Usage:
setsize [x=value] [y=value] [z=value]
The values can also be 0. That means that the size in this direction won't be changed. x, y and z are optional values. If they are not set, they get the value 0.
Example:

setsize x=1 y=2 z=3
setsize z=5
setsize x=0 y=0 z=5

setucvisibility

Sets the visibility of the unitcell axis.
Usage:
setucvisibility value=(0, 1)
0 means that boxes are going to be invisble
Example:

setucvisibility value=0

makro

This command can be used to record, stop recording or starting makros. There are different subcommands set by the property "cmd"
Usage:
makro cmd=rec name=(makroname)
makro cmd=stop name=(makroname)
makro cmd=start name=(makroname)
The nameproperty always has to be set.
rec is for recording makros and can be stopped by the subcommand "stop".
The command start executes the makro.
Example:
makro cmd=rec name=testmakro
makro cmd=stop name=testmakro
makro cmd=start name=testmakro

This example records a makro and stops the recording.
And then it will be executed.

gettransform

Gets the actual transformation (position) of the scene and shows it in the outputfield
Usage:
gettransform
Example output: (this is the starting transformation)

[TRANSFORMATION] rotation=0,0,0,1 translation=0,0,4

settransform

Sets the transformaion (position) of the scene
Usage:
settransform rotation=quaternion(4 floats) translation=vector3d(3 floats)
The values of the quaternion and vecor are seperated by a comma.
Example:

settransform rotation=0.439323,-0.309692,-0.370556,0.757479 translation=0,0,4

getatomtypes

Gets the atomtypes of the actual gtecs3d instance
Usage:
getatomtypes

showgraph

Redraws the graph (also if the program started with -bequiet option).
Usage:
showgraph

setcolor

Changes the color of the nodelist specified by "nodes". set the color to the value of the color property.
Usage:
setcolor nodes=nodelist a=alpha r=red g=green b=blue
The nodelist has to be in form of "atomname@unitcell,atomname2@unitcell,...".
The color is specified by the properties a, r, g, b. Whereas a is the alpha channel.
Example:

setcolor nodes=C2@0_0_0,C2_1@0_0_0,C2_3@0_1_0 a=255 r=127 g=255 b=0

resetcolor

Sets the color of the nodes to theit default color given by the atomtype.
Usage:
resetcolor nodes=nodelist
The nodelist has to be in form of "atomname@unitcell,atomname2@unitcell,...".
Example:

resetcolor nodes=C2@0_0_0,C2_1@0_0_0,C2_3@0_1_0

rotate

Starts a continuos rotation of the scene.
Usage:
roate axis=rotationaxis [center=rotationcenter] speed=rotationspeed
The rotation axis has to be in catresian fomat. Center has to be fractional. Rotation speed is defined as the angle per second in degree.
Example:

rotate axis=1,0,0 center=0,-0.5,0.5 speed=0.2