![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The ShowArrow
command draws an arrow between the two selected locations. If an arrow is shown between two atoms,
both atoms must belong to the same object. The easiest way to add an arrow manually is by marking two atoms like when measuring a distance,
and then clicking 'Show arrow' in the atom context menu of the atom marked with white fireflies.
Arrows without heads are also used to visualize bonds to metal ions
, which are not treated as real bonds in YASARA, but may be specified using CONECT records in a PDB file. During a molecular dynamics simulation,
these pseudo-bonds are converted to distance constraints.
Dotted arrows are currently not available, but can be created with a macro that draws multiple arrows:
Clear
LoadPDB 1crn
# Numbers of the atoms to be linked with a dotted arrow
atom1=13
atom2=127
# Look of the arrow
radius=0.5
color='yellow'
dots=10
# No changes needed below
# Get global positions of the two atoms and distance
for i=1 to 2
pos(i)()=PosAtom (atom(i)),CoordSys=Global
# Get the vector corresponding to one dot
for i=1 to 3
dotvec(i)=(pos2(i)-pos1(i))/(dots+2)
for i=0 to dots
for j=1 to 3
start(j)=pos1(j)+dotvec(j)*i
end(j)=pos1(j)+dotvec(j)*(0.5+i)
if i<dots
ShowArrow Start=Point,(start1),(start2),(start3),End=Point,(end1),(end2),(end3),
Radius=(radius),Heads=0,Color=(color)
else
ShowArrow Start=Point,(start1),(start2),(start3),End=Point,(pos21),(pos22),(pos23),
Radius=(radius),Heads=1,Color=(color)
# Join to one arrow
first=ListObj Arrow
JoinObj Arrow,(first)
Arrows are also helpful to add a scale bar to your image,
i.e. if you show a 5 A long arrow on all screenshots
, the size relationships stay clear even if the screenshots are scaled differently afterwards.
Example 1:ShowArrow Start=AtAtom,1,End=AtAtom,CA,Radius=0.1,Color=Yellow Show yellow arrows with a 0.1 A radius starting at atom 1 and pointing to all CA atoms.
Example 2:ShowArrow Start=DisFromAtom,5,End=AtAtom,500,Radius=0.2,Color=Blue Show a blue arrow with a 0.2 A radius starting 5 A away (with respect to the origin) from atom
5 and pointing towards atom 500. Example 3:ShowArrow Start=AtAtom,5,End=StepFromAtom,500,X=-2,Y=3,Z=1,Radius=0.2,Color=Blue Show a blue arrow with a 0.2 A radius starting at atom 5 and pointing towards a point with offset
-2,3,1 from atom 500. Example 4:ShowArrow Point,-10,0,5,Point,10,0,5,Radius=0.2,Color=Green Create a new object containing a green arrow with a 0.2 A radius starting at point
-10,0,5 and pointing towards point 10,0,5. Example macro:# EXAMPLE ShowArrow Clear LoadPDB 1crn Style Stick ShowArrow Start=AtAtom,1,End=AtAtom,CA,Radius=0.1,Color=Yellow PosObj 1crn,Z=20
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||