Last active
April 6, 2017 20:24
-
-
Save tcmoore3/ee990a748bbbfc2bc784025571772ccc to your computer and use it in GitHub Desktop.
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 numpy import pi | |
import mbuild as mb | |
cer2 = mb.load('cer2.pdb') | |
grid = mb.pattern.Grid2DPattern(50, 50) | |
leaflet, system = mb.Compound(), mb.Compound() | |
repeat_spacing = 6 # repeat spacing in nm | |
leaflet = grid.apply(cer2) # put lipids on gird points | |
leaflet = mb.Compound(leaflet) | |
for layer_num in range(4): # add 4 leaflets to the system | |
new_layer = mb.clone(leaflet) | |
if layer_num % 2 == 1: # rotate every other layer 180deg | |
new_layer.spin(pi, around=[1, 0, 0]) | |
new_layer.translate([0, 0, layer_num * repeat_spacing / 2]) | |
system.add(new_layer) | |
system.save('cer2.hoomdxml') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment