Exemplo n.º 1
0
import copy

# Get the spc slab (makes new xyzO, xyzH1, xyzH2, and shift-related arrays)
filename = 'spc_4_4_6.pdb'; nx = 4; ny = 4; nz = 6
#filename = 'spc_4_4_2.pdb'; nx = 4; ny = 4; nz = 2
#filename = 'spc_10_6_12.pdb'; nx = 10; ny = 6; nz = 12
#filename = 'spc_10_6_14.pdb'; nx = 10; ny = 6; nz = 14

# Naming the output file
dum = filename.find('.pdb')
surfacefilename = filename[0:dum]+'_surface.pdb'
bulkfilename = filename[0:dum]+'_bulk.pdb'

# Not going to do anything to this but add space above the y-facet
viscinaldir = 'y'; nycel=0
xyzO, xyzH1, xyzH2, viscinaldir, shift, vshift, xbox, ybox, zbox, structure = vs.loadit(filename, nx, ny, nz, viscinaldir, nycel)
NR = len(xyzO)

# Get the nearest neighbor index and nearest-neighbor shift array
nni,xyzshift = vs.getnni(xyzO,shift)

# Check for any initial defects based on the original viscinal xyzO, xyzH1, and xyzH2 arrays
nnitol, nnltoi, Ddefect, Adefect = vs.checkfordefects(nni,xyzO,xyzH1,xyzH2,xyzshift)

# Get residues at the surface & bulk
surfacelist, dum = np.where(nni==-1)
alllist = range(NR)
bulklist = np.squeeze(np.argwhere(~np.in1d(alllist,surfacelist)))

# Get slabs of bulk and surface residues
slab_surface = vs.slab(surfacefilename,structure,xyzO, xyzH1, xyzH2)
Exemplo n.º 2
0
import vstuff as vs
reload(vs)

# Get the spc slab (makes new xyzO, xyzH1, xyzH2, and shift-related arrays)
#filename = 'spc_4_4_6.pdb'; nx = 4; ny = 4; nz = 6
#filename = 'spc_4_4_2.pdb'; nx = 4; ny = 4; nz = 2
filename = 'spc_10_6_12.pdb'
nx = 10
ny = 6
nz = 12
#filename = 'spc_10_6_14.pdb'; nx = 10; ny = 6; nz = 14

# Naming the output file
dum = filename.find('.pdb')
outfilename = filename[0:dum] + '_vx_orig.pdb'

# Specify which viscinal surface to generate, and load the slab
viscinaldir = 'yx'
nycel = 1
xyzO, xyzH1, xyzH2, viscinaldir, shift, vshift, xbox, ybox, zbox, structure = \
vs.loadit(filename, nx, ny, nz, viscinaldir, nycel)
slab = vs.slab(filename, structure, xyzO, xyzH1, xyzH2, xbox, ybox, zbox)

# Reconstruct & rotate it, then save it
slab.rotateit(viscinaldir, vshift)
slab.saveit(outfilename)
print slab.xbox, slab.ybox, slab.zbox
Exemplo n.º 3
0
import vstuff as vs; reload(vs)

# Get the spc slab (makes new xyzO, xyzH1, xyzH2, and shift-related arrays)
#filename = 'spc_4_4_6.pdb'; nx = 4; ny = 4; nz = 6 
#filename = 'spc_4_4_2.pdb'; nx = 4; ny = 4; nz = 2
filename = 'spc_10_6_12.pdb'; nx = 10; ny = 6; nz = 12
#filename = 'spc_10_6_14.pdb'; nx = 10; ny = 6; nz = 14

# Naming the output file
dum = filename.find('.pdb')
outfilename = filename[0:dum]+'_vx_orig.pdb'

# Specify which viscinal surface to generate, and load the slab
viscinaldir = 'yx'; nycel=1
xyzO, xyzH1, xyzH2, viscinaldir, shift, vshift, xbox, ybox, zbox, structure = \
vs.loadit(filename, nx, ny, nz, viscinaldir, nycel)
slab = vs.slab(filename,structure,xyzO, xyzH1, xyzH2, xbox, ybox, zbox)

# Reconstruct & rotate it, then save it
slab.rotateit(viscinaldir,vshift)
slab.saveit(outfilename)
print slab.xbox, slab.ybox, slab.zbox