Last active
February 22, 2017 06:24
-
-
Save jrhaberstroh/031ce765b2ee5d56d597067977d0307c to your computer and use it in GitHub Desktop.
Simple MDAnalysis script to read in coordinates, modify them, and write them back out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from MDAnalysis import * | |
filename_in ="fakefile_{}.gro".format("in") | |
filename_out="fakefile_{}.gro".format("out") | |
ref = Universe(filename) | |
R = [[1, 0, 0], [0, 0, 1], [0, 1, 0]] | |
ref.atoms.translate(-ref.atoms.center_of_mass()) | |
ref.atoms.rotate(R) | |
ref.atoms.write(filename_out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment