periodicity now translate correctly when converting to trajectory; added wrap function to compounds