Last active
January 2, 2016 00:09
-
-
Save andersx/8221316 to your computer and use it in GitHub Desktop.
make scan
This file contains hidden or 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 fragbuilder import Peptide | |
| # Create a peptide object with the sequence | |
| # glycine-glycine-glycine. | |
| sequence = "GGG" | |
| pep = Peptide(sequence) | |
| # Define a list of angles. | |
| angles = range(-180, 180, 60) | |
| # Double loop over phi/psi angles in the desired range. | |
| for psi in angles: | |
| for phi in angles: | |
| # Set the second (leucine) residue to (phi, psi). | |
| pep.set_bb_angles(2, [phi, psi]) | |
| # Print the energy of the peptide in this state. | |
| # This is of course just an example. | |
| print pep.get_energy() | |
| # Save each conformation. | |
| pep.write_xyz("pep_%04i_%04i.xyz" % (phi, psi)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment