Esempio n. 1
0
import numpy as np
import makegraphitics as mg

vdw_defs = {1: 90, 2: 91}
R = 15
GO_separation = 10  # approx 1 nm in experiment (with water!)

oxidiser = mg.reactors.Oxidiser(ratio=2.5,
                                video_xyz=20,
                                new_island_freq=1e14,
                                method="rf")

for i in range(3):
    motif = mg.molecules.Hexagon_Graphene(R)
    new_layer = mg.Crystal(motif, [1, 1, 1])
    new_layer = oxidiser.react(new_layer)

    new_layer.coords = new_layer.coords + np.array((0, 0, i * GO_separation))
    if i == 0:
        sim = new_layer
    else:
        sim = mg.Combine(sim, new_layer)

mg.Parameterise(sim, new_layer.vdw_defs)

name = "GO_stack"
output = mg.Writer(sim, name)
output.write_xyz(name + ".xyz")
output.write_lammps(name + ".data")
Esempio n. 2
0
import makegraphitics as mg

flake_radius = 25
layout = [1, 1, 1]  # make a 1x1x1 array of flakes

motif = mg.molecules.Hexagon_Graphene(flake_radius)
flake = mg.Crystal(motif, layout)

oxidiser = mg.reactors.Oxidiser(
    ratio=2.5, video_xyz=20, new_island_freq=1e14, method="rf"
)
flake = oxidiser.react(flake)

mg.Parameterise(flake)

name = "graphene"
output = mg.Writer(flake, name)
output.write_xyz(name + ".xyz")
output.write_lammps(name + ".data")
Esempio n. 3
0
from math import pi, cos
import makegraphitics as mg

config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader)
forcefield = "OPLS"
x_length = 20
y_length = 20

# calculate array of unit cells to make sheet
# unit cell is the orthorombic unit cell of graphene
unit_cell_x = 2.0 * config[forcefield]["CC"] * cos(pi / 6.0)
unit_cell_y = 3.0 * config[forcefield]["CC"]
x_cells = int(x_length / unit_cell_x)
y_cells = int(y_length / unit_cell_y)
layout = [x_cells, y_cells, 1]  # make an array of unit cells with this dimension

motif = mg.molecules.Graphene(forcefield=forcefield)
sheet = mg.Crystal(motif, layout)

oxidiser = mg.reactors.Oxidiser(
    ratio=2.5, video_xyz=20, new_island_freq=1e14, method="rf"
)
sheet = oxidiser.react(sheet)

mg.Parameterise(sheet, sheet.vdw_defs)

name = "GO_sheet"
output = mg.Writer(sheet, name)
output.write_xyz(name + ".xyz")
output.write_lammps(name + ".data")
Esempio n. 4
0
config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader)
forcefield = "OPLS"

x_length = 20
y_length = 20
layers = 10

# calculate array of unit cells to make sheet
# unit cell is the orthorombic unit cell of graphene
unit_cell_x = 2.0 * config[forcefield]["CC"] * cos(pi / 6.0)
unit_cell_y = 3.0 * config[forcefield]["CC"]
x_cells = int(x_length / unit_cell_x)
y_cells = int(y_length / unit_cell_y)
layout = [
    x_cells,
    y_cells,
    int(layers / 2),
]  # make an array of unit cells with this dimension

motif = mg.molecules.Graphite()
graphite = mg.Crystal(motif, layout)
vdw_defs = {1: 90}

mg.Parameterise(graphite, vdw_defs)

name = "graphite"
output = mg.Writer(graphite, name)
output.write_xyz(name + ".xyz")
output.write_lammps(name + ".data")
import yaml
from math import cos, pi
import makegraphitics as mg

config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader)
forcefield = "OPLS"

x_length = 20
y_length = 20

# calculate array of unit cells to make sheet
# unit cell is the orthorombic unit cell of graphene
unit_cell_x = 2.0 * config[forcefield]["CC"] * cos(pi / 6.0)
unit_cell_y = 3.0 * config[forcefield]["CC"]
x_cells = int(x_length / unit_cell_x)
y_cells = int(y_length / unit_cell_y)
layout = [x_cells, y_cells, 1]  # make an array of unit cells with this dimension

motif = mg.molecules.Graphene()
graphene = mg.Crystal(motif, layout)
vdw_defs = {1: 90}

mg.Parameterise(graphene, vdw_defs)

name = "graphene"
output = mg.Writer(graphene, name)
output.write_xyz(name + ".xyz")
output.write_lammps(name + ".data")
Esempio n. 6
0
config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader)

graphite = mg.molecules.Graphite()
bulk = mg.Crystal(graphite, [122, 71, 2])

molecule1 = mg.molecules.Hexagon_Graphene(50)
flake1 = mg.Crystal(molecule1, [1, 1, 1])
# make flake carbons different to bulk
# for atom in range(molecule.natoms):
#    if flake.atom_labels[atom] == 1:
#        flake.atom_labels[atom] = 3

flake1.coords = flake1.coords + np.array((
    20 * 2 * (3**0.5) * config[forcefield]["CC"],
    72 * config[forcefield]["CC"],
    3.7 + (4) * config[forcefield]["layer_gap"],
))
bulk.coords = bulk.coords + np.array((0, 0, 3.7))

bulk.vdw_defs = {1: 90}
flake1.vdw_defs = {1: 90, 2: 91}

sim = mg.Combine(bulk, flake1)
sim.box_dimensions[2] = 30
# output = Shifter(sim,'lammps')
# output.rotate(180,1)
output = mg.Writer(sim, "flake on graphite")
output.write_xyz("graphene.xyz")
output.write_lammps("flake.data")
import makegraphitics as mg

flake_radius = 25
layout = [1, 1, 1]  # make a 1x1x1 array of flakes

motif = mg.molecules.Hexagon_Graphene(flake_radius)
flake = mg.Crystal(motif, layout)

oxidiser = mg.reactors.Oxidiser(ratio=2.5,
                                new_island_freq=1e14,
                                method="rf",
                                carboxyl_charged_ratio=0.5,
                                counterion="Ca"
                                #counterion="Na"
                                )
flake = oxidiser.react(flake)

mg.Parameterise(flake)

flake.validate()

out = mg.Writer(flake)
out.write_xyz()