4
# -------------- graphene sheet -----------------
7
# Hexagonal lattice with:
8
# d = length of each hexagonal side = 1.42 Angstroms
9
# L = length of each hexagon = 2*d = 2.84 Angstroms
10
# W = width of each hexagon = 2*d*sqrt(3)/2 = 2.4595121467478 Angstroms
11
# w = width of hexagon rows = 1.5*d = 2.13 Angstroms
14
unitcells = new Graphene [14].move(1.2297560733739, 2.13, 0)
15
[13].move(2.4595121467478, 0, 0)
17
unitcells[*][*].move(-24.595121467478, -14.91, 0.000)
19
# Now cut a hole in the graphene sheet roughly where the nanotube is located
20
delete unitcells[5][7-8] # delete 2 unit cells (2 atoms each, 4 atoms total)
21
delete unitcells[6][6-8] # delete 3 unit cells (2 atoms each, 6 atoms total)
22
delete unitcells[7][5-8] # delete 4 unit cells (2 atoms each, 8 atoms total)
23
delete unitcells[8][5-7] # delete 3 unit cells (2 atoms each, 6 atoms total)
24
delete unitcells[9][5-6] # delete 2 unit cells (2 atoms each, 4 atoms total)
25
# Optional fine tuning: delete a few additional atoms around the edges
26
delete unitcells[5][6]/C2 # delete a single atom
27
delete unitcells[6][5]/C2 # delete a single atom
28
delete unitcells[6][9]/C1 # delete a single atom
29
delete unitcells[8][4]/C2 # delete a single atom
30
delete unitcells[8][8]/C1 # delete a single atom
31
delete unitcells[9][7]/C1 # delete a single atom
34
# Make two copies of the wall, and place them on either end of the nanotube
36
wall1 = new Wall.move(0, 0, 32.0)
37
wall2 = new Wall.move(0, 0, 58.26)
40
# WARNING: A reader has emailed me to point out that:
41
# THIS IS NOT A REALISTIC MODEL OF A GRAPHENE-NANOTUBE JUNCTION.
42
# A real junction would be curved and deformed near the boundary,
43
# (not 90 degrees) and it would not be built entirely from hexagons.
44
# (This is not a problem in this example because the carbon atoms
45
# are immobilized.) If you want to simulate the behavior of
46
# real graphene or nanotube junctions, you must be more careful.
47
# To solve this problem:
48
# Moltemplate allows you to move, customize or delete individual
49
# atoms near the boundary. You can move atoms by overwriting their
50
# coordinates using additional write("Data Atoms") statements (after
51
# the walls and tube are created). You can also change their charge.
52
# Alternately, you could start with the structure provided here, and
53
# relax/minimize the coordinates of the carbon atoms using LAMMPS
54
# before using it in other simulations.
55
# Or you could do both (customization & minimization).