I followed this link :
http://elmurod.net/en/index.php/archives/348
i can print position x,y in the file like the link but when i added the code for print energy in the file i got the segmentation fault error.
how should i overcome this problem?
with best regards