home - mcalc - documentation
MCALC - documentation
+-+-+-+-+-+-+-+- M O L C A L C +-+-+-+-+-+-+-+-
A molecular calculator by Winfried Meining (winfried@meining.org)
Version 0.40
This program is copyright (C) 2006-2007 by Winfried Meining
MCALC is used to perform various operations on various kinds of algebraic and molecular objects.
+-+-+-+ Usage and command line options +-+-+-+
mcalc [-cmov?V] [-s SCRIPT] [--commands] [--manual] [--objtypes] [--script=SCRIPT] [--verbose] [--help] [--usage] [--version] [scriptfile]
-c --commands display command summary
-m --manual display manual
-o --objtypes display object type summary
-v --verbose increase verbosity
-? --help display command line syntax
--usage display command line syntax (short form)
-V --version display program version
-s <SCRIPT> --script <SCRIPT> execute SCRIPT
+-+-+-+ OBJECT TYPES +-+-+-+
Object types in MCALC:
Key Object type Register format
ANGLE angle REGISTER ANGLE <number>
COMMAND command REGISTER COMMAND <command>
CONDITION condition REGISTER CONDITION <condition>
DIRCOS direction cosines REGISTER DIRCOS <v1> <v2> <v3> <angle>
POLROSSM Rossmann polar angles REGISTER POLROSSM <phi> <psi> <kappa>
POLCROWTH Crowther polar angles REGISTER POLCROWTH <phi> <omega> <kappa>
EULROSSM Rossmann eulerian angles REGISTER EULROSSM <theta1> <theta2> <theta3>
EULNAVAZA Navaza eulerian angles REGISTER EULNAVAZA <alpha> <beta> <gamma>
EULCROWTH Crowther eulerian angles REGISTER EULCROWTH <alpha> <beta> <gamma>
EULLATTM Lattman eulerian angles REGISTER EULLATTM <theta+> <theta> <theta->
FILE file REGISTER FILE <file name>
INT integer REGISTER INT <number>
MAT matrix REGISTER MAT <a11> <a21> <a31> <a12> <a22> <a32> <a13> <a23> <a33>
MOL molecule not applicable
OP operator REGISTER OP <a11> <a21> <a31> <a12> <a22> <a32> <a13> <a23> <a33> <v1> <v2> <v3>
QUAD quadruple REGISTER QUAD <v1> <v2> <v3> <v4>
SCAL scalar REGISTER SCAL <number>
STACK stack not applicable
STRING string REGISTER STRING <string>
TYPE object type REGISTER TYPE <string>
VEC vector REGISTER VEC <v1> <v2> <v3>
+-+-+-+ COMMANDS +-+-+-+
Commands, object types and object names are generally CASE-INSENSITIVE. Commands and
object types can be abbreviated as long as the shortcut is not ambiguous.
Data enclosed in angle brackets < > are mandatory.
When the object type is STRING then the string following <object type> is interpreted as
value, not as object name. STRING expects a string (no whitespace) or a quote-enclosed
text. Occurences of ${scalar name} in values of STRING objects and file names are
replaced by the value of the scalar. <file name> is the actual name of the file. If the
object type is SCAL, then object names are interpreted as actual values, if these are
numerical or if they contain placeholders.
ABS calculate absolute value of object 1 and save in object 2
ABS <scalar> <scalar>
calculate absolute value of <scalar> and save in <scalar>
ABS <integer> <integer>
calculate absolute value of <integer> and save in <integer>
ADD add object 1 to object 2 and save in object 3
ADD <molecule> <vector> <molecule>
add <molecule> to <vector> and save in <molecule>
ADD <matrix> <matrix> <matrix>
add <matrix> to <matrix> and save in <matrix>
ADD <vector> <vector> <vector>
add <vector> to <vector> and save in <vector>
ADD <scalar> <scalar> <scalar>
add <scalar> to <scalar> and save in <scalar>
ADD <integer> <integer> <integer>
add <integer> to <integer> and save in <integer>
ADD <scalar> <integer> <scalar>
add <scalar> to <integer> and save in <scalar>
ADD <integer> <scalar> <scalar>
add <integer> to <scalar> and save in <scalar>
ALIGN determine rotation between object 1 and object 2 and save result in object 3
ALIGN <vector> <vector> <matrix>
determine rotation between <vector> and <vector> and save result in <matrix>
ALIGN <vector> <matrix> <matrix>
determine rotation between <vector> and <matrix> and save result in <matrix>
ALIGN <vector> <direction cosines> <matrix>
determine rotation between <vector> and <direction cosines> and save result in <matrix>
ALIGN <matrix> <vector> <matrix>
determine rotation between <matrix> and <vector> and save result in <matrix>
ALIGN <matrix> <matrix> <matrix>
determine rotation between <matrix> and <matrix> and save result in <matrix>
ALIGN <matrix> <direction cosines> <matrix>
determine rotation between <matrix> and <direction cosines> and save result in <matrix>
ALIGN <direction cosines> <vector> <matrix>
determine rotation between <direction cosines> and <vector> and save result in <matrix>
ALIGN <direction cosines> <matrix> <matrix>
determine rotation between <direction cosines> and <matrix> and save result in <matrix>
ALIGN <direction cosines> <direction cosines> <matrix>
determine rotation between <direction cosines> and <direction cosines> and save result in <matrix>
ANGLE calculate angle between object 1 and object 2 and save in object 3
ANGLE <vector> <vector> <angle>
calculate angle between <vector> and <vector> and save in <angle>
APPEND append object 2 to object 1
APPEND <file> <molecule>
append <molecule> to <file>
APPEND <file> <operator>
append <operator> to <file>
APPEND <file> <matrix>
append <matrix> to <file>
APPEND <file> <vector>
append <vector> to <file>
APPEND <file> <scalar>
append <scalar> to <file>
APPEND <file> <integer>
append <integer> to <file>
APPEND <file> <angle>
append <angle> to <file>
APPEND <file> <value>
append <string> to <file>
APPLY apply object 1 on object 2 and save in object 3
APPLY <operator> <molecule> <molecule>
apply <operator> on <molecule> and save in <molecule>
APPLY <operator> <vector> <vector>
apply <operator> on <vector> and save in <vector>
APPLY <matrix> <molecule> <molecule>
apply <matrix> on <molecule> and save in <molecule>
APPLY <matrix> <vector> <vector>
apply <matrix> on <vector> and save in <vector>
BREAK leave current loop
CONTINUE continue with next loop element
CENTER center object 1 on object 2 and save in object 3
CENTER <molecule> <vector> <molecule>
center <molecule> on <vector> and save in <molecule>
CLOSE close file
CLOSE <file>
close file
COMBINE combine object 1 and object 2 to object 3
COMBINE <matrix> <vector> <operator>
combine <matrix> and <vector> to <operator>
COMBINE <vector> <angle> <direction cosines>
combine <vector> and <angle> to <direction cosines>
COMBINE <molecule> <molecule> <molecule>
combine <molecule> and <molecule> to <molecule>
CONTACT check if the distance between object 1 and object 2 is smaller than <DIST>, save result in object 3
CONTACT <molecule> <molecule> <integer>
check if the distance between <molecule> and <molecule> is smaller than <DIST>, save result in <integer>
COPY copy object 1 to object 2
COPY
COPY <object> <object>
copy <object> to <object>
CONVERT convert object 1 to object 3
CONVERT <scalar> <object type> <angle>
convert <scalar> to <angle>
CONVERT <angle> <object type> <scalar>
convert <angle> to <scalar>
CONVERT <scalar> <object type> <integer>
convert <scalar> to <integer>
CONVERT <integer> <object type> <scalar>
convert <integer> to <scalar>
CONVERT <matrix> <object type> <direction cosines>
convert <matrix> to <direction cosines>
CONVERT <direction cosines> <object type> <matrix>
convert <direction cosines> to <matrix>
CONVERT <matrix> <object type> <Rossmann polar angles>
convert <matrix> to <Rossmann polar angles>
CONVERT <Rossmann polar angles> <object type> <matrix>
convert <Rossmann polar angles> to <matrix>
CONVERT <matrix> <object type> <Crowther polar angles>
convert <matrix> to <Crowther polar angles>
CONVERT <Crowther polar angles> <object type> <matrix>
convert <Crowther polar angles> to <matrix>
CONVERT <Crowther polar angles> <object type> <direction cosines>
convert <Crowther polar angles> to <direction cosines>
CONVERT <Rossmann polar angles> <object type> <direction cosines>
convert <Rossmann polar angles> to <direction cosines>
CONVERT <matrix> <object type> <Rossmann eulerian angles>
convert <matrix> to <Rossmann eulerian angles>
CONVERT <Rossmann eulerian angles> <object type> <matrix>
convert <Rossmann eulerian angles> to <matrix>
CONVERT <matrix> <object type> <Lattman eulerian angles>
convert <matrix> to <Lattman eulerian angles>
CONVERT <Lattman eulerian angles> <object type> <matrix>
convert <Lattman eulerian angles> to <matrix>
CONVERT <matrix> <object type> <Crowther eulerian angles>
convert <matrix> to <Crowther eulerian angles>
CONVERT <Crowther eulerian angles> <object type> <matrix>
convert <Crowther eulerian angles> to <matrix>
CONVERT <matrix> <object type> <Navaza eulerian angles>
convert <matrix> to <Navaza eulerian angles>
CONVERT <Navaza eulerian angles> <object type> <matrix>
convert <Navaza eulerian angles> to <matrix>
COSINE calculate cosine of object 1 and save in object 2
COSINE <angle> <scalar>
calculate cosine of <angle> and save in <scalar>
CROSS calculate cross product of object 1 and object 2 and save in object 3
CROSS <vector> <vector> <vector>
calculate cross product of <vector> and <vector> and save in <vector>
DELETE delete object
DELETE
DELETE <object>
delete object
DET calculate the determinant of object 1 and save in object 2
DET <operator> <scalar>
calculate the determinant of <operator> and save in <scalar>
DET <matrix> <scalar>
calculate the determinant of <matrix> and save in <scalar>
DIFF substract object 2 from object 1 and save in object 3
DIFF <molecule> <vector> <molecule>
substract <vector> from <molecule> and save in <molecule>
DIFF <matrix> <matrix> <matrix>
substract <matrix> from <matrix> and save in <matrix>
DIFF <vector> <vector> <vector>
substract <vector> from <vector> and save in <vector>
DIFF <scalar> <scalar> <scalar>
substract <scalar> from <scalar> and save in <scalar>
DIFF <integer> <integer> <integer>
substract <integer> from <integer> and save in <integer>
DIFF <scalar> <integer> <scalar>
substract <integer> from <scalar> and save in <scalar>
DIFF <integer> <scalar> <scalar>
substract <scalar> from <integer> and save in <scalar>
DISTANCE calculate distance between object 1 and object 2 and save in object 3
DISTANCE <vector> <vector> <scalar>
calculate distance between <vector> and <vector> and save in <scalar>
DISTANCE <molecule> <molecule> <scalar>
calculate distance between <molecule> and <molecule> and save in <scalar>
DIVIDE divide object 1 by object 2 and save in object 3
DIVIDE <matrix> <scalar> <matrix>
divide <matrix> by <scalar> and save in <matrix>
DIVIDE <vector> <scalar> <vector>
divide <vector> by <scalar> and save in <vector>
DIVIDE <scalar> <scalar> <scalar>
divide <scalar> by <scalar> and save in <scalar>
DO start do loop
ECHO echo object 1 to screen
ECHO <string>
echo <string> to screen
ELSE else clause
ENDIF end of if clause
ENDLOOP end of current loop
EXTRACT extract object 3 from object 1
EXTRACT <operator> <object type> <matrix>
extract <matrix> from <operator>
EXTRACT <operator> <object type> <vector>
extract <vector> from <operator>
EXTRACT <direction cosines> <object type> <vector>
extract <vector> from <direction cosines>
EXTRACT <direction cosines> <object type> <angle>
extract <angle> from <direction cosines>
EXTRACT <stack> <object type> <integer>
extract <integer> from <stack>
FECHO echo object 2 to object 1
FECHO <file> <string>
echo <string> to <file>
GETCENTER determine geometric center of object 1 and save in object 2
GETCENTER <molecule> <vector>
determine geometric center of <molecule> and save in <vector>
HELP display manual
IF execute if (object 1 object 2 object 3)
IF <scalar> <string> <scalar>
execute if (<scalar> <string> <scalar>)
IF <integer> <string> <integer>
execute if (<integer> <string> <integer>)
IF <scalar> <string> <integer>
execute if (<scalar> <string> <integer>)
IF <integer> <string> <scalar>
execute if (<integer> <string> <scalar>)
INVERT invert object 1 and save in object 2
INVERT <matrix> <matrix>
invert <matrix> and save in <matrix>
LENGTH calculate the length of object 1 and save in object 2
LENGTH <vector> <scalar>
calculate the length of <vector> and save in <scalar>
LIST list all objects of type object 1
LIST <object type>
list all objects of type <object type>
LOAD load script
LOAD <string>
load script
LOG log to file
LOG <string>
log to file
LOOP object 1 loops from object 2 to object 3 with increment object 4
LOOP <scalar> <scalar> <scalar> <scalar>
<scalar> loops from <scalar> to <scalar> with increment <scalar>
LOOP <integer> <integer> <integer> <integer>
<integer> loops from <integer> to <integer> with increment <integer>
MULTIPLY multiply object 1 with object 2 and save in object 3
MULTIPLY <matrix> <matrix> <matrix>
multiply <matrix> with <matrix> and save in <matrix>
MULTIPLY <matrix> <scalar> <matrix>
multiply <matrix> with <scalar> and save in <matrix>
MULTIPLY <vector> <scalar> <vector>
multiply <vector> with <scalar> and save in <vector>
MULTIPLY <vector> <vector> <scalar>
multiply <vector> with <vector> and save in <scalar>
MULTIPLY <scalar> <scalar> <scalar>
multiply <scalar> with <scalar> and save in <scalar>
MULTIPLY <integer> <integer> <integer>
multiply <integer> with <integer> and save in <integer>
MULTIPLY <scalar> <integer> <scalar>
multiply <scalar> with <integer> and save in <scalar>
MULTIPLY <integer> <scalar> <scalar>
multiply <integer> with <scalar> and save in <scalar>
NORMALIZE normalize object 1 and save in object 2
NORMALIZE <vector> <vector>
normalize <vector> and save in <vector>
NORMALIZE <matrix> <matrix>
normalize <matrix> and save in <matrix>
QUIT quit program execution
POP pop object 2 from object 1, set object 3 to the number of residual slices
POP <stack> <object> <integer>
pop <object> from <stack>, set <integer> to the number of residual slices
PUSH push object 2 on object 1
PUSH <stack> <object>
push <object> on <stack>
FCOMBINE combine object 1, object 2, object 3, and object 4 to object 5
FCOMBINE <scalar> <scalar> <scalar> <scalar> <quadruple>
combine <scalar>, <scalar>, <scalar>, and <scalar> to <quadruple>
FCOMBINE <vector> <vector> <vector> <vector> <operator>
combine <vector>, <vector>, <vector>, and <vector> to <operator>
FSPLIT split object 1 and save in object 2, object 3, object 4 and object 5
FSPLIT <quadruple> <scalar> <scalar> <scalar> <scalar>
split <quadruple> and save in <scalar>, <scalar>, <scalar> and <scalar>
FSPLIT <operator> <vector> <vector> <vector> <vector>
split <operator> and save in <vector>, <vector>, <vector> and <vector>
READ read object 2 from file
READ <object type> <object> <string>
read <object> from file
READDIR read files in object 2 into object 1
READDIR <stack> <string>
read files in <string> into <stack>
REGISTER register object of type object 2
REGISTER <object type> <object> <string>
register object of type <object>
RMSD calculate the root mean square distance between object 1 and object 2, save result in object 3
RMSD <molecule> <molecule> <scalar>
calculate the root mean square distance between <molecule> and <molecule>, save result in <scalar>
RUN run command
RUN <string>
run command
SAVE save object 1 in file
SAVE
SAVE <object> <string>
save <object> in file
SCAN search object 2 in object 1, set object 3 to TRUE (1), if the object is present in object 1
SCAN <stack> <object> <integer>
search <object> in <stack>, set <integer> to TRUE (1), if the object is present in <stack>
SHOW show object
SHOW
SHOW <object>
show object
SINE calculate sine of object 1 and save in object 2
SINE <angle> <scalar>
calculate sine of <angle> and save in <scalar>
SPLITROT split object 1 using object 2 and save in object 3
SPLITROT <operator> <scalar> <operator>
split <operator> using <scalar> and save in <operator>
SPLITROT <matrix> <scalar> <matrix>
split <matrix> using <scalar> and save in <matrix>
TANGENS calculate tangens of object 1 and save in object 2
TANGENS <angle> <scalar>
calculate tangens of <angle> and save in <scalar>
TCOMBINE combine object 1, object 2, and object 3 to object 5
TCOMBINE <scalar> <scalar> <scalar> <object type> <vector>
combine <scalar>, <scalar>, and <scalar> to <vector>
TCOMBINE <angle> <angle> <angle> <object type> <Crowther polar angles>
combine <angle>, <angle>, and <angle> to <Crowther polar angles>
TCOMBINE <angle> <angle> <angle> <object type> <Rossmann polar angles>
combine <angle>, <angle>, and <angle> to <Rossmann polar angles>
TCOMBINE <angle> <angle> <angle> <object type> <Rossmann eulerian angles>
combine <angle>, <angle>, and <angle> to <Rossmann eulerian angles>
TCOMBINE <angle> <angle> <angle> <object type> <Crowther eulerian angles>
combine <angle>, <angle>, and <angle> to <Crowther eulerian angles>
TRANSPOSE transpose object 1 and save in object 2
TRANSPOSE <matrix> <matrix>
transpose <matrix> and save in <matrix>
TSPLIT split object 1 and save in object 2, object 3 and object 4
TSPLIT <vector> <scalar> <scalar> <scalar>
split <vector> and save in <scalar>, <scalar> and <scalar>
TSPLIT <Crowther polar angles> <angle> <angle> <angle>
split <Crowther polar angles> and save in <angle>, <angle> and <angle>
TSPLIT <Rossmann polar angles> <angle> <angle> <angle>
split <Rossmann polar angles> and save in <angle>, <angle> and <angle>
TSPLIT <Crowther eulerian angles> <angle> <angle> <angle>
split <Crowther eulerian angles> and save in <angle>, <angle> and <angle>
TSPLIT <Lattman eulerian angles> <angle> <angle> <angle>
split <Lattman eulerian angles> and save in <angle>, <angle> and <angle>
TSPLIT <Rossmann eulerian angles> <angle> <angle> <angle>
split <Rossmann eulerian angles> and save in <angle>, <angle> and <angle>
VERBOSE set verbosity to object 1
VERBOSE <integer>
set verbosity to <integer>
WHILE continue loop while (object 1 object 2 object 3)
WHILE <scalar> <string> <scalar>
continue loop while (<scalar> <string> <scalar>)
WHILE <integer> <string> <integer>
continue loop while (<integer> <string> <integer>)
WHILE <scalar> <string> <integer>
continue loop while (<scalar> <string> <integer>)
WHILE <integer> <string> <scalar>
continue loop while (<integer> <string> <scalar>)
|