import makegraphitics as mg motif = mg.molecules.Rectangle_Graphene(50, 30) flake = mg.Crystal(motif, [1, 1, 1]) oxidiser = mg.reactors.Oxidiser(ratio=2.2, video_xyz=20, new_island_freq=1e15, method="rf", edge_carboxyl_ratio=0.1) flake = oxidiser.react(flake) mg.Parameterise(flake, flake.vdw_defs) name = "go_50x30" output = mg.Writer(flake, name) output.write_xyz(name + ".xyz") output.write_lammps(name + ".data") output.write_reaxff(name + "reax.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, 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")
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")
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")
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")
import yaml import numpy as np import makegraphitics as mg forcefield = "GraFF_5" 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')
import yaml import numpy as np import math import makegraphitics as mg config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader) forcefield = "GraFF_5" graphite = mg.molecules.Graphite() bulk = mg.Crystal(graphite, [21, 12, 1]) bulk.coords = bulk.coords + np.array((0, 0, 1 * config[forcefield]["layer_gap"])) molecule1 = mg.molecules.Hexagon_Graphene(15) flake1 = mg.Crystal(molecule1, [1, 1, 1]) flake1.coords = flake1.coords + np.array( ( 10 * 2 * math.cos(math.pi / 6) * config[forcefield]["CC"], 6 * 3 * config[forcefield]["CC"], 3 * config[forcefield]["layer_gap"], ) ) bulk.vdw_defs = {1: 90} flake1.vdw_defs = {1: 90, 2: 91} sim = mg.Combine(bulk, flake1) output = mg.Writer(sim, "flake on graphite") output.write_xyz("graphene" + str(1) + ".xyz") output.write_lammps("flake" + str(1) + ".data")
import yaml import numpy as np import makegraphitics as mg config = yaml.load(open("config.yaml"), Loader=yaml.FullLoader) forcefield = "OPLS" vdw_defs = {1: 90, 2: 91} graphite = mg.molecules.Graphene() sim = mg.Crystal(graphite, [40, 30, 1]) sim.vdw_defs = vdw_defs mg.Parameterise(sim, vdw_defs) j = 0 for i in [ 3, 3, 4, 4, 5, 5, 0, 0, 0, 15, 13, 11, 9, 7, 12,