Commit cd4f4f8f authored by Adam Fekete's avatar Adam Fekete

update notebook part 1

parent 5a1be7b2
......@@ -36,3 +36,6 @@ syntax: glob
#emacs TAGS
TAGS
.idea
notebook/FF-fit_adam.bkr
notebook/FF-fit_aldo.bkr
This diff is collapsed.
This diff is collapsed.
......@@ -17,18 +17,46 @@ class TimeStep(object):
import ase
atoms = ase.atoms.Atoms(
'Si',
positions=self.confs,
'Si'*len(self.confs),
positions=np.asarray(self.confs, dtype=np.float),
cell=[self.xhi-self.xlo, self.yhi-self.xlo,self.zhi-self.zlo],
pbc=[1, 1, 1],
)
N = 207
num_lines = sum(1 for line in open('disloiron.xyz'))
steps = 100 # num_lines/(N+2)
# N = 207
# num_lines = sum(1 for line in open('disloiron.xyz'))
# steps = 100 # num_lines/(N+2)
N = len(self.confs)
r_cut = 5 # 3.5 4.4
cutoffs = np.ones(len(atoms)) * r_cut / 2.
nl = NeighborList(cutoffs, skin=0., sorted=False, self_interaction=False,
bothways=True)
nl.build(atoms)
confs=[]
cell = atoms.get_cell()
indices, offsets = nl.get_neighbors(0)
offsets = np.dot(offsets, cell)
conf = np.zeros((len(indices), 3))
for i, (a2, offset) in enumerate(zip(indices, offsets)):
d = atoms.positions[a2] + offset - atoms.positions[0]
conf[i] = d
confs.append(conf)
print(confs)
cutoffs = np.ones(N) * r_cut / 2.
print(cutoffs)
......@@ -160,6 +188,9 @@ if __name__ == '__main__':
filename='data-lammps/Silic_300/Si_300_dump.atom'
with ReadLammpsDumpFile(filename) as file:
for timestep in file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment