please do

# The following script is a demonstration of
# how to rotate a selection around an axis
# or some atoms of an het group around a bond,
# and move selection around.


open pdb from download "1ATP.pdb"; 

print "Now is a good time to resize the Graphic Window and update the rendering parameters.";
print "Once you are  ready, simply resume the script execution by clicking on line 15";
silent stop;

# --- select residues that are close to the ATP
#     show them and center view on it.

$SEL1 = select in "1atp" name "ATP1";
$SEL2 = select within 4.0 of $SEL1;
show res,side of $SEL2;
center on visible;
compute in "1ATP" hbond;

$FRAMECNT = 1;

# ----------- rotate atp around an axis defined by two atoms ----------

$ATM1 = get coord " PG " of $SEL1;
$ATM2 = get coord " N1 " of $SEL1;

$X = 0;
do
{
	rotate $SEL1 by 20.0 deg around axis $ATM1 $ATM2;
	compute in "1ATP" hbond;
	$IMAGE = (fstring "IMAGE%04d.png") $FRAMECNT;
	export png in usrstuff as $IMAGE;
	$FRAMECNT++;
	$X++;
} while ($X < 18);

# ----------- rotate a SUBPART of atp around an axis defined by two atoms ----------

$X = 0;
do
{
	rotate atoms of $SEL1 by 20.0 deg around bond " C1' " " N9 ";
	compute in "1ATP" hbond;
	$IMAGE = (fstring "IMAGE%04d.png") $FRAMECNT;
	export png in usrstuff as $IMAGE;
	$FRAMECNT++;
	$X++;
} while ($X < 18);


# ----------- move atp around  ----------

$V[0] = <0.3,0.0,0.0>;
$V[1] = <0.0,0.3,0.0>;
$V[2] = <-0.3,0.0,0.0>;
$V[3] = <0.0,-0.3,0.0>;

$i = 0;
do
{
	$X = 0;
	do
	{
		move $SEL1 by $V[$i];
		compute in "1ATP" hbond;
		$IMAGE = (fstring "IMAGE%04d.png") $FRAMECNT;
		export png in usrstuff as $IMAGE;
		$FRAMECNT++;
		$X++;
	} while ($X < 5);
} while (++$i < 4);


thank you
