Example: vmd > veczero Info) 0 0 0
Examples: vmd > vecadd {1 2 3} {4 5 6} {7 8 9} {-11 -11 -11} Info) 1 4 7 vmd > vecadd {0.1 0.2 0.4 0.8} {1 1 2 3} {3 1 4 1} Info) 4.1 2.2 6.4 4.8 vmd > vecadd 4 5 Info) 9
Examples: vmd > vecsub 6 3.2 Info) 2.8 vmd > vecsub {10 9.8 7} {0.1 0 -0.1} Info) 9.9 9.8 7.1 vmd > vecsub {1 2 3 4 5} {6 7 8 9 10} Info) -5 -5 -5 -5 -5
Examples: vmd > vecscale .2 {1 2 3} Info) 0.2 0.4 0.6 vmd > vecscale {-5 4 -3 2} -2 Info) 10 -8 6 -4 vmd > vecscale -2 3 Info) -6
Examples: vmd > vecdot {1 -2 3} {4 5 6} Info) 12 vmd > vecdot {3 4} {3 4} Info) 25 vmd > vecdot {1 2 3 4 5} {5 4 3 2 1} Info) 35 vmd > vecdot 3 -2 Info) -6
Examples: vmd > veccross {1 0 0} {0 1 0} Info) 0 0 1 vmd > veccross {2 2 2} {-1 0 0} Info) 0 -2 2
Examples: vmd> veclength 5 Info) 5.0 vmd > veclength {5 12} Info) 13.0 vmd > veclength {3 4 12} Info) 13.0 vmd > veclength {1 -2 3 -4} Info) 5.47723
Examples: vmd > veclength2 5 Info) 25 vmd > veclength2 {5 12} Info) 169 vmd > veclength2 {3 4 12} Info) 169 vmd > veclength2 {1 -2 3 -4} Info) 30
Examples: vmd > vecnorm -10 Info) -1.0 vmd > vecnorm {1 1 } Info) 0.707109 0.707109 vmd > vecnorm {2 -3 1} Info) 0.534522 -0.801783 0.267261 vmd > vecnorm {2 2 -2 2 -2 -2} Info) 0.408248 0.408248 -0.408248 0.408248 -0.408248 -0.408248
Examples: vmd > vecdist -1.5 5.5 Info) 7.0 vmd > vecdist {0 0 0} {3 4 0} Info) 5.0 vmd > vecdist {0 1 2 3 4 5 6} {-6 -5 -4 -3 -2 -1 0} Info) 15.8745
Examples: vmd > vecinvert -11.1 Info) 11.1 vmd > vecinvert {3 -4 5} Info) -3 4 -5 vmd > vecinvert {0 -1 2 -3} Info) 0 1 -2 3