Upload 297 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- Home.py +62 -0
- README.md +6 -16
- data/ADEPT/.gitignore +4 -0
- data/ADEPT/1.AmorphousGeneration/APG_gas.py +350 -0
- data/ADEPT/1.AmorphousGeneration/APG_resp.py +474 -0
- data/ADEPT/1.AmorphousGeneration/CH3.mol +12 -0
- data/ADEPT/1.AmorphousGeneration/electronic_properties.py +505 -0
- data/ADEPT/2.Simulations/lammps_TC.in +74 -0
- data/ADEPT/2.Simulations/lammps_Tg.in +84 -0
- data/ADEPT/2.Simulations/lammps_dc.in +49 -0
- data/ADEPT/2.Simulations/lammps_emd.in +154 -0
- data/ADEPT/2.Simulations/lammps_eq1.in +76 -0
- data/ADEPT/2.Simulations/lammps_eq2.in +69 -0
- data/ADEPT/2.Simulations/lammps_visc.in +116 -0
- data/ADEPT/2.Simulations/modulus_files/displace.mod +210 -0
- data/ADEPT/2.Simulations/modulus_files/in.elastic +132 -0
- data/ADEPT/2.Simulations/modulus_files/in_1.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_10.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_100.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_11.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_12.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_13.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_14.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_15.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_16.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_17.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_18.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_19.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_2.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_20.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_21.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_22.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_23.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_24.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_25.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_26.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_27.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_28.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_29.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_3.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_30.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_31.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_32.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_33.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_34.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_35.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_36.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_37.elastic +154 -0
- data/ADEPT/2.Simulations/modulus_files/in_38.elastic +154 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
data/PI1M.csv filter=lfs diff=lfs merge=lfs -text
|
Home.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from src.ui_style import apply_global_style
|
| 3 |
+
|
| 4 |
+
st.set_page_config(page_title="Home", layout="wide")
|
| 5 |
+
apply_global_style()
|
| 6 |
+
st.title("Polymer Discovery & Property Prediction")
|
| 7 |
+
st.caption(
|
| 8 |
+
"Explore polymer properties, run bulk predictions, visualize structures, "
|
| 9 |
+
"and perform multi-objective discovery with manual or AI-assisted workflows."
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
st.markdown("### Quick Start")
|
| 13 |
+
|
| 14 |
+
cards = [
|
| 15 |
+
(
|
| 16 |
+
"Property Probe",
|
| 17 |
+
"Input a single SMILES or polymer name and retrieve predicted or available values for one target property. "
|
| 18 |
+
"Best for quick validation before larger screening.",
|
| 19 |
+
"pages/1_Property_Probe.py",
|
| 20 |
+
),
|
| 21 |
+
(
|
| 22 |
+
"Batch Prediction",
|
| 23 |
+
"Upload or paste many SMILES and run bulk property prediction in one job. "
|
| 24 |
+
"Useful when you want ranked outputs and exportable tables for downstream analysis.",
|
| 25 |
+
"pages/2_Batch_Prediction.py",
|
| 26 |
+
),
|
| 27 |
+
(
|
| 28 |
+
"Molecular View",
|
| 29 |
+
"Render 2D and 3D molecular structures, inspect composition, and download visual assets "
|
| 30 |
+
"or MOL files for documentation and simulation setup.",
|
| 31 |
+
"pages/3_Molecular_View.py",
|
| 32 |
+
),
|
| 33 |
+
(
|
| 34 |
+
"Discovery (Manual)",
|
| 35 |
+
"Set hard constraints, objectives, trust/selection weights, and diversity settings directly. "
|
| 36 |
+
"Designed for controlled multi-objective exploration with transparent parameter tuning.",
|
| 37 |
+
"pages/4_Discovery_(Manual).py",
|
| 38 |
+
),
|
| 39 |
+
(
|
| 40 |
+
"Discovery (AI)",
|
| 41 |
+
"Describe target behavior in natural language and let the LLM build discovery settings. "
|
| 42 |
+
"You can run directly or inspect/edit the generated JSON in advanced mode.",
|
| 43 |
+
"pages/5_Discovery_(AI).py",
|
| 44 |
+
),
|
| 45 |
+
(
|
| 46 |
+
"Novel SMILES Generation",
|
| 47 |
+
"Sample new polymer SMILES with the pretrained RNN and filter out molecules already present "
|
| 48 |
+
"in local datasets (EXP/MD/DFT/GC/POLYINFO/PI1M).",
|
| 49 |
+
"pages/6_Novel_SMILES_Generation.py",
|
| 50 |
+
),
|
| 51 |
+
]
|
| 52 |
+
|
| 53 |
+
for i, (title, desc, page_path) in enumerate(cards, start=1):
|
| 54 |
+
box = st.container(border=True)
|
| 55 |
+
with box:
|
| 56 |
+
c1, c2 = st.columns([5, 1.2])
|
| 57 |
+
with c1:
|
| 58 |
+
st.markdown(f"**{title}**")
|
| 59 |
+
st.caption(desc)
|
| 60 |
+
with c2:
|
| 61 |
+
if st.button("Go", type="primary", key=f"home_go_{i}"):
|
| 62 |
+
st.switch_page(page_path)
|
README.md
CHANGED
|
@@ -1,19 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
app_port: 8501
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
-
pinned: false
|
| 11 |
-
short_description: Polymer Property Prediction and Discovery
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
|
| 17 |
-
|
| 18 |
-
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 19 |
-
forums](https://discuss.streamlit.io).
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Polymer Property Predictor
|
| 3 |
+
emoji: 🧪
|
| 4 |
+
sdk: streamlit
|
| 5 |
+
sdk_version: "1.30.0"
|
| 6 |
+
app_file: Home.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
+
Polymer property prediction platform.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/ADEPT/.gitignore
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.pyc
|
| 3 |
+
.ipynb_checkpoints/
|
| 4 |
+
.DS_Store
|
data/ADEPT/1.AmorphousGeneration/APG_gas.py
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
# coding: utf-8
|
| 3 |
+
|
| 4 |
+
import csv
|
| 5 |
+
import os
|
| 6 |
+
import sys
|
| 7 |
+
from rdkit import rdBase, Chem
|
| 8 |
+
from rdkit.Chem import AllChem
|
| 9 |
+
from pysimm import system, lmps, forcefield
|
| 10 |
+
from pysimm.apps.random_walk import random_walk, copolymer
|
| 11 |
+
|
| 12 |
+
nproc = 6
|
| 13 |
+
smiles_csv = "../SMILES.csv"
|
| 14 |
+
mol_file_dir = "./test/"
|
| 15 |
+
mol_file_gen = True
|
| 16 |
+
# Use this variable to take a single gen_pid from the command line
|
| 17 |
+
gen_pid = sys.argv[1] # Command-line argument to capture single gen_pid
|
| 18 |
+
|
| 19 |
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
| 20 |
+
ch3_mol_path = os.path.join(script_dir, 'CH3.mol')
|
| 21 |
+
ter = system.read_mol(ch3_mol_path)
|
| 22 |
+
|
| 23 |
+
all_gen = False
|
| 24 |
+
natoms = 600
|
| 25 |
+
replica = 6
|
| 26 |
+
density = 0.01
|
| 27 |
+
def rewrite_atom_block_clean(filepath):
|
| 28 |
+
with open(filepath, 'r') as f:
|
| 29 |
+
lines = f.readlines()
|
| 30 |
+
|
| 31 |
+
counts_line = lines[3]
|
| 32 |
+
natoms = int(counts_line[:3])
|
| 33 |
+
nbonds = int(counts_line[3:6])
|
| 34 |
+
print(f"Cleaning .mol file: Atoms = {natoms}, Bonds = {nbonds}")
|
| 35 |
+
|
| 36 |
+
atom_lines = lines[4:4+natoms]
|
| 37 |
+
cleaned = []
|
| 38 |
+
|
| 39 |
+
for line in atom_lines:
|
| 40 |
+
fields = line.strip().split()
|
| 41 |
+
if len(fields) < 4:
|
| 42 |
+
raise ValueError(f"Malformed atom line: {line}")
|
| 43 |
+
x, y, z, element = fields[:4]
|
| 44 |
+
extras = fields[4:] + ['0'] * (12 - len(fields[4:]))
|
| 45 |
+
cleaned_line = f"{float(x):>10.4f}{float(y):>10.4f}{float(z):>10.4f} {element:<3}" + ''.join(f"{int(val):3d}" for val in extras[:12]) + '\n'
|
| 46 |
+
cleaned.append(cleaned_line)
|
| 47 |
+
|
| 48 |
+
lines[4:4+natoms] = cleaned
|
| 49 |
+
with open(filepath, 'w') as f:
|
| 50 |
+
f.writelines(lines)
|
| 51 |
+
|
| 52 |
+
print(f"Finished cleaning {filepath}")
|
| 53 |
+
|
| 54 |
+
def GenMolFile(file_name, smiles):
|
| 55 |
+
try:
|
| 56 |
+
e = ''
|
| 57 |
+
smiles = smiles.replace('*', '[3H]')
|
| 58 |
+
mol = Chem.MolFromSmiles(smiles)
|
| 59 |
+
mol, e = ETKDG(mol, version=2)
|
| 60 |
+
if e:
|
| 61 |
+
print('Polymer ID = '+str(gen_pid)+'\n'+str(e))
|
| 62 |
+
else:
|
| 63 |
+
Chem.MolToMolFile(mol, file_name, kekulize=False)
|
| 64 |
+
except:
|
| 65 |
+
pass
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def ETKDG(mol, version=1):
|
| 69 |
+
mh = Chem.AddHs(mol)
|
| 70 |
+
if version == 1:
|
| 71 |
+
p = AllChem.ETKDG()
|
| 72 |
+
elif version == 2:
|
| 73 |
+
p = AllChem.ETKDGv2()
|
| 74 |
+
else:
|
| 75 |
+
print('invalid input')
|
| 76 |
+
|
| 77 |
+
try:
|
| 78 |
+
AllChem.EmbedMolecule(mh, p)
|
| 79 |
+
except Exception as e:
|
| 80 |
+
return [mh, e]
|
| 81 |
+
|
| 82 |
+
return [mh, '']
|
| 83 |
+
|
| 84 |
+
def GetHeadTailAtoms(mol_file):
|
| 85 |
+
mol = Chem.MolFromMolFile(mol_file)
|
| 86 |
+
idx_list = []
|
| 87 |
+
for atom in mol.GetAtoms():
|
| 88 |
+
if atom.GetSymbol() == "H" and atom.GetIsotope() == 3:
|
| 89 |
+
idx = atom.GetNeighbors()[0].GetIdx()
|
| 90 |
+
idx+=1
|
| 91 |
+
idx_list.append(idx)
|
| 92 |
+
|
| 93 |
+
return idx_list
|
| 94 |
+
|
| 95 |
+
def PolymerGen(mol_file, head, tail, length=20, natoms=None, density=0.1, nproc=1, debug=False):
|
| 96 |
+
|
| 97 |
+
os.environ['OMP_NUM_THREADS'] = str(nproc)
|
| 98 |
+
|
| 99 |
+
s = system.read_mol(mol_file)
|
| 100 |
+
if natoms:
|
| 101 |
+
na = s.particles.count
|
| 102 |
+
length = int(natoms/(na - 2) + 0.5)
|
| 103 |
+
print("Polymer length = %d, Num. of atoms = %d" % (length, length*(na - 2)))
|
| 104 |
+
p_head = s.particles[head]
|
| 105 |
+
p_tail = s.particles[tail]
|
| 106 |
+
p_head.linker = 'head'
|
| 107 |
+
p_tail.linker = 'tail'
|
| 108 |
+
|
| 109 |
+
for b in p_head.bonds:
|
| 110 |
+
if b.a.elem == 'H' or b.b.elem == 'H':
|
| 111 |
+
pb = b.a if b.b is p_head else b.b
|
| 112 |
+
s.particles.remove(pb.tag, update=False)
|
| 113 |
+
break
|
| 114 |
+
|
| 115 |
+
for b in p_tail.bonds:
|
| 116 |
+
if b.a.elem == 'H' or b.b.elem == 'H':
|
| 117 |
+
pb = b.a if b.b is p_tail else b.b
|
| 118 |
+
s.particles.remove(pb.tag, update=False)
|
| 119 |
+
break
|
| 120 |
+
|
| 121 |
+
s.remove_spare_bonding()
|
| 122 |
+
|
| 123 |
+
f = forcefield.Gaff2()
|
| 124 |
+
s.apply_forcefield(f)
|
| 125 |
+
if debug:
|
| 126 |
+
for p in s.particles:
|
| 127 |
+
print(p.type.name)
|
| 128 |
+
s.add_particle_bonding()
|
| 129 |
+
s.apply_charges(f, charges='gasteiger')
|
| 130 |
+
lmps.quick_min(s, min_style='sd')
|
| 131 |
+
|
| 132 |
+
lmps.quick_min(s, min_style='fire')
|
| 133 |
+
|
| 134 |
+
print('Building polymer chain by random walk')
|
| 135 |
+
polymer = random_walk(s, nmon=length, forcefield=f, reassign=False)
|
| 136 |
+
|
| 137 |
+
# Fix bond order
|
| 138 |
+
for b in polymer.bonds:
|
| 139 |
+
if b.order == None:
|
| 140 |
+
b.order = 1
|
| 141 |
+
|
| 142 |
+
# Termination of a polymer chain by -CH3
|
| 143 |
+
# Getting the terminal atoms in the generated polymer
|
| 144 |
+
p_count = polymer.particles.count
|
| 145 |
+
flag = False
|
| 146 |
+
for p in polymer.particles:
|
| 147 |
+
if p.linker == 'tail' and not flag: # Updated: 'is' replaced with '=='
|
| 148 |
+
p_tail = p
|
| 149 |
+
flag = True
|
| 150 |
+
elif p.linker == 'head': # Updated: 'is' replaced with '=='
|
| 151 |
+
p_head = p
|
| 152 |
+
p.linker = None
|
| 153 |
+
|
| 154 |
+
p_head.linker = 'head'
|
| 155 |
+
p_tail.linker = 'tail'
|
| 156 |
+
print("Polymer head = %s\ttail = %s\tcount = %s" % (p_head.tag, p_tail.tag, p_count))
|
| 157 |
+
|
| 158 |
+
ter = system.read_mol(ch3_mol_path)
|
| 159 |
+
ter.particles[1].linker = 'tail'
|
| 160 |
+
ter.apply_forcefield(f)
|
| 161 |
+
ter.apply_charges(f, charges='gasteiger')
|
| 162 |
+
|
| 163 |
+
# Termination process 1
|
| 164 |
+
print('Terminating polymer chain, process 1')
|
| 165 |
+
c1_polymer = copolymer([polymer, ter], nmon=1, forcefield=f, traj=False)
|
| 166 |
+
|
| 167 |
+
# Getting the terminal atoms in the generated polymer
|
| 168 |
+
p_count = c1_polymer.particles.count
|
| 169 |
+
flag = False
|
| 170 |
+
for p in c1_polymer.particles:
|
| 171 |
+
if p.linker == 'tail' and not flag: # Updated: 'is' replaced with '=='
|
| 172 |
+
p_tail = p
|
| 173 |
+
flag = True
|
| 174 |
+
elif p.linker == 'head': # Updated: 'is' replaced with '=='
|
| 175 |
+
p_head = p
|
| 176 |
+
p.linker = None
|
| 177 |
+
|
| 178 |
+
p_head.linker = 'tail' # Replacement of head to tail
|
| 179 |
+
p_tail.linker = 'head'
|
| 180 |
+
print("Polymer head = %s\ttail = %s\tcount = %s" % (p_head.tag, p_tail.tag, p_count))
|
| 181 |
+
|
| 182 |
+
# Termination process 2
|
| 183 |
+
print('Terminating polymer chain, process 2')
|
| 184 |
+
c2_polymer = copolymer([c1_polymer, ter], nmon=1, forcefield=f, traj=False)
|
| 185 |
+
if debug:
|
| 186 |
+
for p in c2_polymer.particles:
|
| 187 |
+
print(p.type.name)
|
| 188 |
+
|
| 189 |
+
# Fix linker and bond order
|
| 190 |
+
for p in c2_polymer.particles:
|
| 191 |
+
p.linker = None
|
| 192 |
+
for b in c2_polymer.bonds:
|
| 193 |
+
if b.order == None:
|
| 194 |
+
b.order = 1
|
| 195 |
+
# Re-assignment of forcefield and charge for a terminated polymer
|
| 196 |
+
print("Re-assignment of forcefield and charge")
|
| 197 |
+
c2_polymer.apply_forcefield(f)
|
| 198 |
+
if debug:
|
| 199 |
+
for p in c2_polymer.particles:
|
| 200 |
+
print(p.type.name)
|
| 201 |
+
c2_polymer.apply_charges(f, charges='gasteiger')
|
| 202 |
+
|
| 203 |
+
c2_polymer.set_mm_dist()
|
| 204 |
+
lmps.quick_min(c2_polymer, min_style='sd')
|
| 205 |
+
lmps.quick_min(c2_polymer, min_style='fire')
|
| 206 |
+
c2_polymer.write_lammps('polymer.lmps')
|
| 207 |
+
c2_polymer.write_xyz('polymer.xyz')
|
| 208 |
+
|
| 209 |
+
return c2_polymer
|
| 210 |
+
|
| 211 |
+
|
| 212 |
+
def calculate_polymer_properties(mol_file, pid, natoms=600,replica=6):
|
| 213 |
+
|
| 214 |
+
mol = Chem.MolFromMolFile(mol_file)
|
| 215 |
+
if mol is None:
|
| 216 |
+
raise ValueError("Invalid molecular file or format.")
|
| 217 |
+
|
| 218 |
+
# Add explicit hydrogens
|
| 219 |
+
mol = Chem.AddHs(mol)
|
| 220 |
+
|
| 221 |
+
# Reset isotopic masses to defaults
|
| 222 |
+
for atom in mol.GetAtoms():
|
| 223 |
+
atom.SetIsotope(0) # Reset all isotopes
|
| 224 |
+
|
| 225 |
+
# Identify head and tail atoms connected to isotopic hydrogens (if present)
|
| 226 |
+
head_tail_atoms = []
|
| 227 |
+
for atom in mol.GetAtoms():
|
| 228 |
+
if atom.GetSymbol() == "H" and atom.GetIsotope() == 3:
|
| 229 |
+
head_tail_atoms.append(atom.GetNeighbors()[0].GetIdx())
|
| 230 |
+
print(f"Head and Tail Atoms: {head_tail_atoms}")
|
| 231 |
+
|
| 232 |
+
# Calculate monomer molar mass
|
| 233 |
+
monomer_weight = 0.0
|
| 234 |
+
num_atoms_in_monomer = mol.GetNumAtoms()
|
| 235 |
+
for atom in mol.GetAtoms():
|
| 236 |
+
monomer_weight += atom.GetMass()
|
| 237 |
+
|
| 238 |
+
# Adjust for head and tail hydrogens (2 hydrogens removed)
|
| 239 |
+
removed_h_weight = 2 * 1.008 # Hydrogen atomic mass
|
| 240 |
+
adjusted_monomer_weight = monomer_weight - removed_h_weight
|
| 241 |
+
|
| 242 |
+
# Calculate the number of monomers in the chain
|
| 243 |
+
n_monomers = int(natoms / (num_atoms_in_monomer - 2) + 0.5)
|
| 244 |
+
|
| 245 |
+
# Add termination group weight (CH3 on both ends)
|
| 246 |
+
termination_group_weight = 2 * (12.01 + 3 * 1.008) # CH3 group on both sides
|
| 247 |
+
total_chain_weight = n_monomers * adjusted_monomer_weight + termination_group_weight
|
| 248 |
+
ampolymer_weight=total_chain_weight*replica
|
| 249 |
+
# Print results
|
| 250 |
+
print(f"Monomer Molar Mass (g/mol): {adjusted_monomer_weight:.2f}")
|
| 251 |
+
print(f"Number of Monomers in Chain: {n_monomers}")
|
| 252 |
+
print(f"Total Chain Molar Mass (g/mol): {total_chain_weight:.2f}")
|
| 253 |
+
print(f"Amorphous Polymer Molar Mass (g/mol): {ampolymer_weight:.2f}")
|
| 254 |
+
# Save each value to separate files
|
| 255 |
+
with open(f"{pid}_monomer_weight.dat", "w") as f:
|
| 256 |
+
f.write(f"{adjusted_monomer_weight:.2f}\n")
|
| 257 |
+
|
| 258 |
+
with open(f"{pid}_number_of_monomers.dat", "w") as f:
|
| 259 |
+
f.write(f"{n_monomers}\n")
|
| 260 |
+
|
| 261 |
+
with open(f"{pid}_total_chain_weight.dat", "w") as f:
|
| 262 |
+
f.write(f"{total_chain_weight:.2f}\n")
|
| 263 |
+
|
| 264 |
+
with open(f"{pid}_ampolymer_weight.dat", "w") as f:
|
| 265 |
+
f.write(f"{ampolymer_weight:.2f}\n")
|
| 266 |
+
|
| 267 |
+
print(f"Values saved to separate files with prefix '{pid}'")
|
| 268 |
+
|
| 269 |
+
def AmorphousGen(polymer, pid, replica=10, density=0.1, nproc=1, debug=False):
|
| 270 |
+
os.environ['OMP_NUM_THREADS'] = str(nproc)
|
| 271 |
+
|
| 272 |
+
print('Building amorphous cell of polymer')
|
| 273 |
+
amo_polymer = system.replicate(polymer, replica, density=density, rand=True)
|
| 274 |
+
print('amo gen done')
|
| 275 |
+
amo_polymer.set_mm_dist()
|
| 276 |
+
amo_polymer.write_lammps('amorphous_polymer_{}.lmps'.format(pid))
|
| 277 |
+
amo_polymer.write_xyz('amorphous_polymer_{}.xyz'.format(pid))
|
| 278 |
+
|
| 279 |
+
return amo_polymer
|
| 280 |
+
|
| 281 |
+
print(gen_pid)
|
| 282 |
+
|
| 283 |
+
if mol_file_gen:
|
| 284 |
+
with open(smiles_csv, encoding='ISO-8859-1') as f: # Updated: Added encoding to prevent UnicodeDecodeError
|
| 285 |
+
reader = csv.reader(f)
|
| 286 |
+
data_found = False
|
| 287 |
+
for row in reader:
|
| 288 |
+
if row[0] == gen_pid:
|
| 289 |
+
file_name = mol_file_dir + row[0] + '.mol'
|
| 290 |
+
smiles = row[1]
|
| 291 |
+
GenMolFile(file_name, smiles)
|
| 292 |
+
data_found = True
|
| 293 |
+
break # Stop after processing the matching PID
|
| 294 |
+
|
| 295 |
+
if not data_found:
|
| 296 |
+
print(f"PID {gen_pid} not found in SMILES.csv")
|
| 297 |
+
|
| 298 |
+
# Proceed with the rest of the script for generating polymers and amorphous structures...
|
| 299 |
+
|
| 300 |
+
# Determining atom indexes of head and tail atom
|
| 301 |
+
head_tail = {}
|
| 302 |
+
pid_list = []
|
| 303 |
+
file_list = sorted(os.listdir(mol_file_dir))
|
| 304 |
+
for file_name in file_list:
|
| 305 |
+
if os.path.isfile(mol_file_dir + file_name) and file_name.endswith(".mol"):
|
| 306 |
+
pid = file_name.rstrip(".mol") # ✅ define pid early
|
| 307 |
+
try:
|
| 308 |
+
mol_path = mol_file_dir + file_name
|
| 309 |
+
|
| 310 |
+
# Clean the .mol file before parsing
|
| 311 |
+
rewrite_atom_block_clean(mol_path)
|
| 312 |
+
|
| 313 |
+
# Get head/tail from cleaned file
|
| 314 |
+
tail, head = GetHeadTailAtoms(mol_path)
|
| 315 |
+
|
| 316 |
+
pid_list.append(pid)
|
| 317 |
+
head_tail[pid] = {"head": head, "tail": tail}
|
| 318 |
+
print(f"Polymer ID = {pid}\tHead = {head}\tTail = {tail}\n")
|
| 319 |
+
except Exception as e:
|
| 320 |
+
print(f"Polymer ID = {pid} Failed! Reason: {e}")
|
| 321 |
+
if all_gen:
|
| 322 |
+
pid_list = pid_list
|
| 323 |
+
else:
|
| 324 |
+
pid_list = [gen_pid] # Just the single PID you passed as an argument
|
| 325 |
+
|
| 326 |
+
for pid in pid_list:
|
| 327 |
+
if os.path.isdir(mol_file_dir + pid) and all_gen:
|
| 328 |
+
continue
|
| 329 |
+
|
| 330 |
+
print(pid)
|
| 331 |
+
if not os.path.exists(mol_file_dir + pid):
|
| 332 |
+
os.makedirs(mol_file_dir + pid)
|
| 333 |
+
|
| 334 |
+
polymer_data_dir = '../POLYMER_DATA/MODEL/' + pid
|
| 335 |
+
if not os.path.exists(polymer_data_dir):
|
| 336 |
+
os.makedirs(polymer_data_dir)
|
| 337 |
+
|
| 338 |
+
cwd = os.getcwd()
|
| 339 |
+
os.chdir(polymer_data_dir)
|
| 340 |
+
|
| 341 |
+
try:
|
| 342 |
+
mol_file_path = os.path.join(script_dir, 'test', f'{pid}.mol')
|
| 343 |
+
polymer = PolymerGen(mol_file_path, head_tail[pid]["head"], head_tail[pid]["tail"],
|
| 344 |
+
natoms=natoms, density=density, nproc=nproc, debug=True)
|
| 345 |
+
calculate_polymer_properties(mol_file_path, pid)
|
| 346 |
+
AmorphousGen(polymer, pid, replica=replica, density=density, nproc=nproc, debug=True)
|
| 347 |
+
except Exception as e:
|
| 348 |
+
print(e)
|
| 349 |
+
|
| 350 |
+
os.chdir(cwd)
|
data/ADEPT/1.AmorphousGeneration/APG_resp.py
ADDED
|
@@ -0,0 +1,474 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
# coding: utf-8
|
| 3 |
+
|
| 4 |
+
import csv
|
| 5 |
+
import os
|
| 6 |
+
import sys
|
| 7 |
+
from rdkit import rdBase, Chem
|
| 8 |
+
from rdkit.Chem import AllChem
|
| 9 |
+
from pysimm import system, lmps, forcefield
|
| 10 |
+
from pysimm.apps.random_walk import random_walk, copolymer
|
| 11 |
+
import time
|
| 12 |
+
import numpy as np
|
| 13 |
+
|
| 14 |
+
mol_file_gen = True
|
| 15 |
+
gen_pid = sys.argv[1]
|
| 16 |
+
nproc = int(sys.argv[2])
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
all_gen = False
|
| 20 |
+
natoms = 600
|
| 21 |
+
replica = 6
|
| 22 |
+
density = 0.01
|
| 23 |
+
charge_type = "resp"
|
| 24 |
+
|
| 25 |
+
ch3_charges = np.array([-0.54422096, 0.18133882, 0.18154373, 0.18133841])
|
| 26 |
+
ch3_positions = [
|
| 27 |
+
(-2.5721942e-05, 1.7851831e-05, 4.4830327e-05),
|
| 28 |
+
(-0.16312222344, -1.022431951556, 0.307698571486),
|
| 29 |
+
(0.89613005499, 0.51962506855, 0.305933966401),
|
| 30 |
+
(-0.732701564789, 0.502594324309, -0.614166324907),
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
smiles_csv = "../SMILES.csv"
|
| 35 |
+
mol_file_dir = "./test/"
|
| 36 |
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
| 37 |
+
ch3_mol_path = os.path.join(script_dir, 'CH3.mol')
|
| 38 |
+
ter = system.read_mol(ch3_mol_path)
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def GenMolFile(file_name, smiles):
|
| 44 |
+
try:
|
| 45 |
+
e = ''
|
| 46 |
+
smiles = smiles.replace('*', '[3H]')
|
| 47 |
+
mol = Chem.MolFromSmiles(smiles)
|
| 48 |
+
mol, e = ETKDG(mol, version=2)
|
| 49 |
+
if e:
|
| 50 |
+
print('Polymer ID = '+str(gen_pid)+'\n'+str(e))
|
| 51 |
+
else:
|
| 52 |
+
Chem.MolToMolFile(mol, file_name, kekulize=False)
|
| 53 |
+
except:
|
| 54 |
+
pass
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def ETKDG(mol, version=1):
|
| 58 |
+
mh = Chem.AddHs(mol)
|
| 59 |
+
if version == 1:
|
| 60 |
+
p = AllChem.ETKDG()
|
| 61 |
+
elif version == 2:
|
| 62 |
+
p = AllChem.ETKDGv2()
|
| 63 |
+
else:
|
| 64 |
+
print('invalid input')
|
| 65 |
+
|
| 66 |
+
try:
|
| 67 |
+
AllChem.EmbedMolecule(mh, p)
|
| 68 |
+
except Exception as e:
|
| 69 |
+
return [mh, e]
|
| 70 |
+
|
| 71 |
+
return [mh, '']
|
| 72 |
+
|
| 73 |
+
def GetHeadTailAtoms(mol_file):
|
| 74 |
+
mol = Chem.MolFromMolFile(mol_file)
|
| 75 |
+
idx_list = []
|
| 76 |
+
for atom in mol.GetAtoms():
|
| 77 |
+
if atom.GetSymbol() == "H" and atom.GetIsotope() == 3:
|
| 78 |
+
idx = atom.GetNeighbors()[0].GetIdx()
|
| 79 |
+
idx+=1
|
| 80 |
+
idx_list.append(idx)
|
| 81 |
+
|
| 82 |
+
return idx_list
|
| 83 |
+
|
| 84 |
+
def assign_resp_charges(
|
| 85 |
+
pysimm_obj,
|
| 86 |
+
output_xyz="output.xyz",
|
| 87 |
+
nproc=1,
|
| 88 |
+
opt=True, # Unified parameter for geometry optimization and PySIMM update
|
| 89 |
+
opt_method='wb97m-d3bj',
|
| 90 |
+
opt_basis='6-31G(d,p)',
|
| 91 |
+
geom_iter=200,
|
| 92 |
+
charge_method='HF',
|
| 93 |
+
charge_basis='6-31G(d)',
|
| 94 |
+
total_charge=0,
|
| 95 |
+
total_multiplicity=1,
|
| 96 |
+
log_name='charge'
|
| 97 |
+
):
|
| 98 |
+
"""
|
| 99 |
+
Assign RESP charges and optionally optimized geometry to a PySIMM object using Psi4 and the RESP plugin.
|
| 100 |
+
Writes an XYZ file, calculates RESP charges, and assigns charges directly to particles.
|
| 101 |
+
If `opt` is True, geometry optimization is performed and the PySIMM object is updated with optimized coordinates.
|
| 102 |
+
"""
|
| 103 |
+
import psi4
|
| 104 |
+
import resp
|
| 105 |
+
|
| 106 |
+
psi4.set_num_threads(nproc)
|
| 107 |
+
psi4.set_memory('4 GB')
|
| 108 |
+
|
| 109 |
+
try:
|
| 110 |
+
# Step 1: Write XYZ file from PySIMM object
|
| 111 |
+
pysimm_obj.write_xyz(output_xyz)
|
| 112 |
+
print(f"XYZ file written to: {output_xyz}")
|
| 113 |
+
|
| 114 |
+
# Step 2: Read XYZ file for Psi4
|
| 115 |
+
with open(output_xyz, 'r') as f:
|
| 116 |
+
mol_str = f.read()
|
| 117 |
+
psi4_mol = psi4.geometry(mol_str)
|
| 118 |
+
psi4_mol.set_molecular_charge(total_charge)
|
| 119 |
+
psi4_mol.set_multiplicity(total_multiplicity)
|
| 120 |
+
|
| 121 |
+
# Step 3: Set Psi4 options
|
| 122 |
+
#psi4.set_options({
|
| 123 |
+
#'reference': 'uhf' if total_multiplicity > 1 else 'rhf', # Use UHF for radicals
|
| 124 |
+
#'basis': charge_basis,
|
| 125 |
+
#'scf_type': 'df',
|
| 126 |
+
# })
|
| 127 |
+
psi4.set_options({
|
| 128 |
+
'reference': 'uhf' if total_multiplicity > 1 else 'rhf',
|
| 129 |
+
'basis': charge_basis,
|
| 130 |
+
'scf_type': 'df',
|
| 131 |
+
'maxiter': 200,
|
| 132 |
+
'diis': True,
|
| 133 |
+
'damping_percentage': 30,
|
| 134 |
+
'guess': 'sad',
|
| 135 |
+
})
|
| 136 |
+
|
| 137 |
+
# Step 4: Geometry Optimization and Update (if opt=True)
|
| 138 |
+
if opt:
|
| 139 |
+
psi4.set_options({'geom_maxiter': geom_iter})
|
| 140 |
+
psi4.optimize(f"{opt_method}/{opt_basis}", molecule=psi4_mol)
|
| 141 |
+
|
| 142 |
+
# Update PySIMM object with optimized geometry
|
| 143 |
+
optimized_geometry = psi4_mol.save_string_xyz()
|
| 144 |
+
with open(f"optimized_monomer.xyz", "w") as f:
|
| 145 |
+
f.write(optimized_geometry)
|
| 146 |
+
positions = []
|
| 147 |
+
for line in optimized_geometry.splitlines()[1:]: # Skip first two lines of XYZ format
|
| 148 |
+
parts = line.split()
|
| 149 |
+
if len(parts) == 4:
|
| 150 |
+
x, y, z = map(float, parts[1:])
|
| 151 |
+
positions.append((x, y, z))
|
| 152 |
+
|
| 153 |
+
# Validate position count
|
| 154 |
+
if len(positions) != len(pysimm_obj.particles):
|
| 155 |
+
raise ValueError("Number of positions in the Psi4 molecule does not match the number of particles.")
|
| 156 |
+
|
| 157 |
+
# Assign the new positions to the particles
|
| 158 |
+
for particle, pos in zip(pysimm_obj.particles, positions):
|
| 159 |
+
particle.x, particle.y, particle.z = pos
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
print(f"Optimized geometry updated in PySIMM object.")
|
| 163 |
+
else:
|
| 164 |
+
print(f"Skipping geometry optimization and PySIMM geometry update.")
|
| 165 |
+
|
| 166 |
+
# Step 5: RESP Fitting
|
| 167 |
+
options = {
|
| 168 |
+
'RESP_A': 0.0005,
|
| 169 |
+
'RESP_B': 0.1,
|
| 170 |
+
'VDW_SCALE_FACTORS': [1.4, 1.6, 1.8, 2.0],
|
| 171 |
+
'VDW_POINT_DENSITY': 1.0,
|
| 172 |
+
}
|
| 173 |
+
charges = resp.resp([psi4_mol], options)
|
| 174 |
+
|
| 175 |
+
# Step 6: Verify and Assign RESP charges to PySIMM particles
|
| 176 |
+
if len(charges[1]) != len(pysimm_obj.particles):
|
| 177 |
+
raise ValueError(
|
| 178 |
+
f"RESP charges ({len(charges[1])}) do not match PySIMM particles ({len(pysimm_obj.particles)})."
|
| 179 |
+
)
|
| 180 |
+
|
| 181 |
+
for i, particle in enumerate(pysimm_obj.particles):
|
| 182 |
+
particle.charge = charges[1][i]
|
| 183 |
+
|
| 184 |
+
print(f"RESP charges successfully assigned to PySIMM particles.")
|
| 185 |
+
return pysimm_obj # Return updated PySIMM object with RESP charges and geometry (if optimized)
|
| 186 |
+
|
| 187 |
+
except Exception as e:
|
| 188 |
+
print(f"Error in RESP charge assignment: {e}")
|
| 189 |
+
return None
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
def PolymerGen(mol_file, head, tail, length=20, natoms=None, density=0.1, nproc=1, debug=False):
|
| 193 |
+
|
| 194 |
+
os.environ['OMP_NUM_THREADS'] = str(nproc)
|
| 195 |
+
|
| 196 |
+
s = system.read_mol(mol_file)
|
| 197 |
+
if natoms:
|
| 198 |
+
na = s.particles.count
|
| 199 |
+
length = int(natoms/(na - 2) + 0.5)
|
| 200 |
+
print("Polymer length = %d, Num. of atoms = %d" % (length, length*(na - 2)))
|
| 201 |
+
|
| 202 |
+
p_head = s.particles[head]
|
| 203 |
+
p_tail = s.particles[tail]
|
| 204 |
+
p_head.linker = 'head'
|
| 205 |
+
p_tail.linker = 'tail'
|
| 206 |
+
|
| 207 |
+
for b in p_head.bonds:
|
| 208 |
+
if b.a.elem == 'H' or b.b.elem == 'H':
|
| 209 |
+
pb = b.a if b.b is p_head else b.b
|
| 210 |
+
s.particles.remove(pb.tag, update=False)
|
| 211 |
+
break
|
| 212 |
+
|
| 213 |
+
for b in p_tail.bonds:
|
| 214 |
+
if b.a.elem == 'H' or b.b.elem == 'H':
|
| 215 |
+
pb = b.a if b.b is p_tail else b.b
|
| 216 |
+
s.particles.remove(pb.tag, update=False)
|
| 217 |
+
break
|
| 218 |
+
|
| 219 |
+
s.remove_spare_bonding()
|
| 220 |
+
|
| 221 |
+
f = forcefield.Gaff2()
|
| 222 |
+
s.apply_forcefield(f)
|
| 223 |
+
if debug:
|
| 224 |
+
for p in s.particles:
|
| 225 |
+
print(p.type.name)
|
| 226 |
+
s.add_particle_bonding()
|
| 227 |
+
|
| 228 |
+
if charge_type == "resp":
|
| 229 |
+
# Use RESP charge assignment
|
| 230 |
+
s = assign_resp_charges(pysimm_obj=s,output_xyz="monomer.xyz",nproc=nproc,opt=True,total_multiplicity=1)
|
| 231 |
+
|
| 232 |
+
else:
|
| 233 |
+
# Use Gasteiger charge assignment
|
| 234 |
+
s.apply_charges(f, charges='gasteiger')
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
lmps.quick_min(s, min_style='sd')
|
| 239 |
+
lmps.quick_min(s, min_style='fire')
|
| 240 |
+
|
| 241 |
+
print('Building polymer chain by random walk')
|
| 242 |
+
polymer = random_walk(s, nmon=length, forcefield=f, reassign=False)
|
| 243 |
+
|
| 244 |
+
# Fix bond order
|
| 245 |
+
for b in polymer.bonds:
|
| 246 |
+
if b.order == None:
|
| 247 |
+
b.order = 1
|
| 248 |
+
|
| 249 |
+
# Termination of a polymer chain by -CH3
|
| 250 |
+
# Getting the terminal atoms in the generated polymer
|
| 251 |
+
p_count = polymer.particles.count
|
| 252 |
+
flag = False
|
| 253 |
+
for p in polymer.particles:
|
| 254 |
+
if p.linker == 'tail' and not flag: # Updated: 'is' replaced with '=='
|
| 255 |
+
p_tail = p
|
| 256 |
+
flag = True
|
| 257 |
+
elif p.linker == 'head': # Updated: 'is' replaced with '=='
|
| 258 |
+
p_head = p
|
| 259 |
+
p.linker = None
|
| 260 |
+
|
| 261 |
+
p_head.linker = 'head'
|
| 262 |
+
p_tail.linker = 'tail'
|
| 263 |
+
print("Polymer head = %s\ttail = %s\tcount = %s" % (p_head.tag, p_tail.tag, p_count))
|
| 264 |
+
|
| 265 |
+
ter = system.read_mol(ch3_mol_path)
|
| 266 |
+
ter.particles[1].linker = 'tail'
|
| 267 |
+
ter.apply_forcefield(f)
|
| 268 |
+
|
| 269 |
+
if charge_type == "resp":
|
| 270 |
+
# Use RESP charge assignment
|
| 271 |
+
#ter = assign_resp_charges(pysimm_obj=ter,output_xyz="ter.xyz",nproc=nproc,opt=True,total_multiplicity=2)
|
| 272 |
+
ch3_particles = ter.particles[-4:]
|
| 273 |
+
for i, particle in enumerate(ch3_particles):
|
| 274 |
+
particle.charge = ch3_charges[i]
|
| 275 |
+
particle.x, particle.y, particle.z = ch3_positions[i]
|
| 276 |
+
|
| 277 |
+
else:
|
| 278 |
+
# Use Gasteiger charge assignment
|
| 279 |
+
ter.apply_charges(f, charges="gasteiger")
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
# Termination process 1
|
| 283 |
+
print('Terminating polymer chain, process 1')
|
| 284 |
+
c1_polymer = copolymer([polymer, ter], nmon=1, forcefield=f, traj=False)
|
| 285 |
+
|
| 286 |
+
# Getting the terminal atoms in the generated polymer
|
| 287 |
+
p_count = c1_polymer.particles.count
|
| 288 |
+
flag = False
|
| 289 |
+
for p in c1_polymer.particles:
|
| 290 |
+
if p.linker == 'tail' and not flag: # Updated: 'is' replaced with '=='
|
| 291 |
+
p_tail = p
|
| 292 |
+
flag = True
|
| 293 |
+
elif p.linker == 'head': # Updated: 'is' replaced with '=='
|
| 294 |
+
p_head = p
|
| 295 |
+
p.linker = None
|
| 296 |
+
|
| 297 |
+
p_head.linker = 'tail' # Replacement of head to tail
|
| 298 |
+
p_tail.linker = 'head'
|
| 299 |
+
print("Polymer head = %s\ttail = %s\tcount = %s" % (p_head.tag, p_tail.tag, p_count))
|
| 300 |
+
|
| 301 |
+
# Termination process 2
|
| 302 |
+
print('Terminating polymer chain, process 2')
|
| 303 |
+
c2_polymer = copolymer([c1_polymer, ter], nmon=1, forcefield=f, traj=False)
|
| 304 |
+
if debug:
|
| 305 |
+
for p in c2_polymer.particles:
|
| 306 |
+
print(p.type.name)
|
| 307 |
+
|
| 308 |
+
# Fix linker and bond order
|
| 309 |
+
for p in c2_polymer.particles:
|
| 310 |
+
p.linker = None
|
| 311 |
+
for b in c2_polymer.bonds:
|
| 312 |
+
if b.order == None:
|
| 313 |
+
b.order = 1
|
| 314 |
+
# Re-assignment of forcefield and charge for a terminated polymer
|
| 315 |
+
print("Re-assignment of forcefield and charge")
|
| 316 |
+
c2_polymer.apply_forcefield(f)
|
| 317 |
+
if debug:
|
| 318 |
+
for p in c2_polymer.particles:
|
| 319 |
+
print(p.type.name)
|
| 320 |
+
|
| 321 |
+
if charge_type == "resp":
|
| 322 |
+
# Use RESP charge assignment
|
| 323 |
+
#c2_polymer = assign_resp_charges(pysimm_obj=c2_polymer,output_xyz="c2_polymer.xyz",nproc=nproc,opt=True,total_multiplicity=1)
|
| 324 |
+
print("Skipping RESP charge assignment")
|
| 325 |
+
|
| 326 |
+
else:
|
| 327 |
+
# Use Gasteiger charge assignment
|
| 328 |
+
c2_polymer.apply_charges(f, charges='gasteiger')
|
| 329 |
+
|
| 330 |
+
c2_polymer.set_mm_dist()
|
| 331 |
+
lmps.quick_min(c2_polymer, min_style='sd')
|
| 332 |
+
lmps.quick_min(c2_polymer, min_style='fire')
|
| 333 |
+
c2_polymer.write_lammps('polymer.lmps')
|
| 334 |
+
c2_polymer.write_xyz('polymer.xyz')
|
| 335 |
+
|
| 336 |
+
return c2_polymer
|
| 337 |
+
def calculate_polymer_properties(mol_file, pid, natoms=600,replica=6):
|
| 338 |
+
|
| 339 |
+
mol = Chem.MolFromMolFile(mol_file)
|
| 340 |
+
if mol is None:
|
| 341 |
+
raise ValueError("Invalid molecular file or format.")
|
| 342 |
+
|
| 343 |
+
# Add explicit hydrogens
|
| 344 |
+
mol = Chem.AddHs(mol)
|
| 345 |
+
|
| 346 |
+
# Reset isotopic masses to defaults
|
| 347 |
+
for atom in mol.GetAtoms():
|
| 348 |
+
atom.SetIsotope(0) # Reset all isotopes
|
| 349 |
+
|
| 350 |
+
# Identify head and tail atoms connected to isotopic hydrogens (if present)
|
| 351 |
+
head_tail_atoms = []
|
| 352 |
+
for atom in mol.GetAtoms():
|
| 353 |
+
if atom.GetSymbol() == "H" and atom.GetIsotope() == 3:
|
| 354 |
+
head_tail_atoms.append(atom.GetNeighbors()[0].GetIdx())
|
| 355 |
+
print(f"Head and Tail Atoms: {head_tail_atoms}")
|
| 356 |
+
|
| 357 |
+
# Calculate monomer molar mass
|
| 358 |
+
monomer_weight = 0.0
|
| 359 |
+
num_atoms_in_monomer = mol.GetNumAtoms()
|
| 360 |
+
for atom in mol.GetAtoms():
|
| 361 |
+
monomer_weight += atom.GetMass()
|
| 362 |
+
|
| 363 |
+
# Adjust for head and tail hydrogens (2 hydrogens removed)
|
| 364 |
+
removed_h_weight = 2 * 1.008 # Hydrogen atomic mass
|
| 365 |
+
adjusted_monomer_weight = monomer_weight - removed_h_weight
|
| 366 |
+
|
| 367 |
+
# Calculate the number of monomers in the chain
|
| 368 |
+
n_monomers = int(natoms / (num_atoms_in_monomer - 2) + 0.5)
|
| 369 |
+
|
| 370 |
+
# Add termination group weight (CH3 on both ends)
|
| 371 |
+
termination_group_weight = 2 * (12.01 + 3 * 1.008) # CH3 group on both sides
|
| 372 |
+
total_chain_weight = n_monomers * adjusted_monomer_weight + termination_group_weight
|
| 373 |
+
ampolymer_weight=total_chain_weight*replica
|
| 374 |
+
# Print results
|
| 375 |
+
print(f"Monomer Molar Mass (g/mol): {adjusted_monomer_weight:.2f}")
|
| 376 |
+
print(f"Number of Monomers in Chain: {n_monomers}")
|
| 377 |
+
print(f"Total Chain Molar Mass (g/mol): {total_chain_weight:.2f}")
|
| 378 |
+
print(f"Amorphous Polymer Molar Mass (g/mol): {ampolymer_weight:.2f}")
|
| 379 |
+
# Save each value to separate files
|
| 380 |
+
with open(f"{pid}_monomer_weight.dat", "w") as f:
|
| 381 |
+
f.write(f"{adjusted_monomer_weight:.2f}\n")
|
| 382 |
+
|
| 383 |
+
with open(f"{pid}_number_of_monomers.dat", "w") as f:
|
| 384 |
+
f.write(f"{n_monomers}\n")
|
| 385 |
+
|
| 386 |
+
with open(f"{pid}_total_chain_weight.dat", "w") as f:
|
| 387 |
+
f.write(f"{total_chain_weight:.2f}\n")
|
| 388 |
+
|
| 389 |
+
with open(f"{pid}_ampolymer_weight.dat", "w") as f:
|
| 390 |
+
f.write(f"{ampolymer_weight:.2f}\n")
|
| 391 |
+
|
| 392 |
+
print(f"Values saved to separate files with prefix '{pid}'")
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
def AmorphousGen(polymer, pid, replica=10, density=0.1, nproc=1, debug=False):
|
| 396 |
+
os.environ['OMP_NUM_THREADS'] = str(nproc)
|
| 397 |
+
|
| 398 |
+
print('Building amorphous cell of polymer')
|
| 399 |
+
amo_polymer = system.replicate(polymer, replica, density=density, rand=True)
|
| 400 |
+
print('amo gen done')
|
| 401 |
+
amo_polymer.set_mm_dist()
|
| 402 |
+
amo_polymer.write_lammps('amorphous_polymer_{}.lmps'.format(pid))
|
| 403 |
+
amo_polymer.write_xyz('amorphous_polymer_{}.xyz'.format(pid))
|
| 404 |
+
|
| 405 |
+
return amo_polymer
|
| 406 |
+
|
| 407 |
+
print(gen_pid)
|
| 408 |
+
|
| 409 |
+
if mol_file_gen:
|
| 410 |
+
with open(smiles_csv, encoding='ISO-8859-1') as f: # Updated: Added encoding to prevent UnicodeDecodeError
|
| 411 |
+
reader = csv.reader(f)
|
| 412 |
+
data_found = False
|
| 413 |
+
for row in reader:
|
| 414 |
+
if row[0] == gen_pid:
|
| 415 |
+
file_name = mol_file_dir + row[0] + '.mol'
|
| 416 |
+
smiles = row[1]
|
| 417 |
+
GenMolFile(file_name, smiles)
|
| 418 |
+
data_found = True
|
| 419 |
+
break # Stop after processing the matching PID
|
| 420 |
+
|
| 421 |
+
if not data_found:
|
| 422 |
+
print(f"PID {gen_pid} not found in SMILES.csv")
|
| 423 |
+
|
| 424 |
+
# Proceed with the rest of the script for generating polymers and amorphous structures...
|
| 425 |
+
|
| 426 |
+
# Determining atom indexes of head and tail atom
|
| 427 |
+
head_tail = {}
|
| 428 |
+
pid_list = []
|
| 429 |
+
file_list = sorted(os.listdir(mol_file_dir))
|
| 430 |
+
for file_name in file_list:
|
| 431 |
+
if os.path.isfile(mol_file_dir+file_name) and file_name.endswith(".mol"):
|
| 432 |
+
try:
|
| 433 |
+
tail, head = GetHeadTailAtoms(mol_file_dir+file_name)
|
| 434 |
+
pid = file_name.rstrip(".mol")
|
| 435 |
+
pid_list.append(pid)
|
| 436 |
+
head_tail[pid] = {"head": head, "tail": tail}
|
| 437 |
+
print("Polymer ID = "+str(pid)+"\tHead = "+str(head_tail[pid]["head"])+"\tTail = "+str(head_tail[pid]["tail"])+"\n")
|
| 438 |
+
except:
|
| 439 |
+
print("Polymer ID = "+str(pid)+" Failed!")
|
| 440 |
+
|
| 441 |
+
if all_gen:
|
| 442 |
+
pid_list = pid_list
|
| 443 |
+
else:
|
| 444 |
+
pid_list = [gen_pid] # Just the single PID you passed as an argument
|
| 445 |
+
|
| 446 |
+
for pid in pid_list:
|
| 447 |
+
if os.path.isdir(mol_file_dir + pid) and all_gen:
|
| 448 |
+
continue
|
| 449 |
+
|
| 450 |
+
print(pid)
|
| 451 |
+
if not os.path.exists(mol_file_dir + pid):
|
| 452 |
+
os.makedirs(mol_file_dir + pid)
|
| 453 |
+
|
| 454 |
+
polymer_data_dir = '../POLYMER_DATA/MODEL/' + pid
|
| 455 |
+
if not os.path.exists(polymer_data_dir):
|
| 456 |
+
os.makedirs(polymer_data_dir)
|
| 457 |
+
|
| 458 |
+
cwd = os.getcwd()
|
| 459 |
+
os.chdir(polymer_data_dir)
|
| 460 |
+
|
| 461 |
+
try:
|
| 462 |
+
start_time = time.time()
|
| 463 |
+
mol_file_path = os.path.join(script_dir, 'test', f'{pid}.mol')
|
| 464 |
+
polymer = PolymerGen(mol_file_path, head_tail[pid]["head"], head_tail[pid]["tail"],
|
| 465 |
+
natoms=natoms, density=density, nproc=nproc, debug=True)
|
| 466 |
+
calculate_polymer_properties(mol_file_path, pid)
|
| 467 |
+
AmorphousGen(polymer, pid, replica=replica, density=density, nproc=nproc, debug=True)
|
| 468 |
+
end_time = time.time()
|
| 469 |
+
elapsed_time = end_time - start_time
|
| 470 |
+
print(f"Total script execution time: {elapsed_time:.2f} seconds")
|
| 471 |
+
except Exception as e:
|
| 472 |
+
print(e)
|
| 473 |
+
|
| 474 |
+
os.chdir(cwd)
|
data/ADEPT/1.AmorphousGeneration/CH3.mol
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CH3.mol
|
| 2 |
+
PySIMM
|
| 3 |
+
Generated by PySIMM
|
| 4 |
+
4 3 0 0 0 999 V2000
|
| 5 |
+
-0.0127 1.0858 0.0080 C 0 0 0 0 0 0 0 0 0 0 0 0
|
| 6 |
+
0.0021 -0.0041 0.0020 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 7 |
+
1.0099 1.4631 0.0003 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 8 |
+
-0.5398 1.4469 -0.8751 H 0 0 0 0 0 0 0 0 0 0 0 0
|
| 9 |
+
1 2 1 0 0 0 0
|
| 10 |
+
1 3 1 0 0 0 0
|
| 11 |
+
1 4 1 0 0 0 0
|
| 12 |
+
M END
|
data/ADEPT/1.AmorphousGeneration/electronic_properties.py
ADDED
|
@@ -0,0 +1,505 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import csv
|
| 3 |
+
import sys
|
| 4 |
+
import psi4
|
| 5 |
+
import time
|
| 6 |
+
from rdkit import Chem
|
| 7 |
+
from rdkit.Chem import AllChem
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def generate_molecule(smiles):
|
| 11 |
+
"""
|
| 12 |
+
Generates a 3D molecule from a SMILES string using the ETKDG method.
|
| 13 |
+
Replaces attachment points (*) with tritium (H[3]).
|
| 14 |
+
"""
|
| 15 |
+
smiles = smiles.replace("*", "[3H]") # Replace attachment points
|
| 16 |
+
mol = Chem.MolFromSmiles(smiles)
|
| 17 |
+
if mol is None:
|
| 18 |
+
raise ValueError(f"Invalid SMILES string: {smiles}")
|
| 19 |
+
mol = Chem.AddHs(mol)
|
| 20 |
+
params = AllChem.ETKDGv2()
|
| 21 |
+
AllChem.EmbedMolecule(mol, params)
|
| 22 |
+
return mol
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def generate_xyz_string(mol):
|
| 26 |
+
"""
|
| 27 |
+
Generates the XYZ format string for an RDKit molecule suitable for Psi4.
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
mol: An RDKit molecule object with 3D coordinates.
|
| 31 |
+
|
| 32 |
+
Returns:
|
| 33 |
+
xyz_content (str): The molecule in XYZ file format as a string.
|
| 34 |
+
"""
|
| 35 |
+
conf = mol.GetConformer()
|
| 36 |
+
atoms = mol.GetAtoms()
|
| 37 |
+
lines = [f"{len(atoms)}", ""] # First line: atom count, second line: blank
|
| 38 |
+
|
| 39 |
+
for i, atom in enumerate(atoms):
|
| 40 |
+
pos = conf.GetAtomPosition(i)
|
| 41 |
+
lines.append(f"{atom.GetSymbol()} {pos.x:.6f} {pos.y:.6f} {pos.z:.6f}")
|
| 42 |
+
|
| 43 |
+
xyz_content = "\n".join(lines)
|
| 44 |
+
return xyz_content
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def geometry_optimization(xyz_file, num_processors=1):
|
| 48 |
+
"""
|
| 49 |
+
Optimize molecular geometry using Psi4.
|
| 50 |
+
|
| 51 |
+
Args:
|
| 52 |
+
xyz_file (str): Path to the input XYZ file.
|
| 53 |
+
num_processors (int): Number of processors to use (default: 1).
|
| 54 |
+
|
| 55 |
+
Returns:
|
| 56 |
+
optimized_geometry (str): The optimized geometry in XYZ format.
|
| 57 |
+
"""
|
| 58 |
+
import psi4
|
| 59 |
+
import time
|
| 60 |
+
|
| 61 |
+
# Load molecule from XYZ file
|
| 62 |
+
with open(xyz_file, "r") as f:
|
| 63 |
+
mol = psi4.geometry(f.read())
|
| 64 |
+
|
| 65 |
+
# Set memory and number of threads
|
| 66 |
+
psi4.set_memory("4 GB")
|
| 67 |
+
psi4.set_num_threads(num_processors)
|
| 68 |
+
|
| 69 |
+
print("Performing geometry optimization...")
|
| 70 |
+
start_optimization = time.time()
|
| 71 |
+
|
| 72 |
+
# Step 1: Initial Semi-Empirical Optimization
|
| 73 |
+
print("Performing initial semi-empirical optimization...")
|
| 74 |
+
try:
|
| 75 |
+
psi4.set_options({'geom_maxiter': 30, 'maxiter': 50})
|
| 76 |
+
psi4.optimize('hf/sto-3g', molecule=mol)
|
| 77 |
+
print("Initial semi-empirical optimization converged successfully.")
|
| 78 |
+
except psi4.OptimizationConvergenceError:
|
| 79 |
+
print("WARNING: Initial semi-empirical optimization did not converge. Using the latest geometry.")
|
| 80 |
+
|
| 81 |
+
# Step 2: Hartree-Fock Optimization
|
| 82 |
+
print("Performing Hartree-Fock optimization...")
|
| 83 |
+
try:
|
| 84 |
+
psi4.set_options({'geom_maxiter': 50, 'maxiter': 100})
|
| 85 |
+
psi4.optimize('hf/6-31G', molecule=mol)
|
| 86 |
+
print("Hartree-Fock optimization converged successfully.")
|
| 87 |
+
except psi4.OptimizationConvergenceError:
|
| 88 |
+
print("WARNING: Hartree-Fock optimization did not converge. Using the latest geometry.")
|
| 89 |
+
|
| 90 |
+
# Step 3: Final DFT Refinement
|
| 91 |
+
print("Performing final DFT refinement...")
|
| 92 |
+
try:
|
| 93 |
+
psi4.set_options({'geom_maxiter': 100, 'maxiter': 150})
|
| 94 |
+
psi4.optimize('wb97m-d3bj/6-311+G(2d,p)', molecule=mol)
|
| 95 |
+
print("Final DFT refinement converged successfully.")
|
| 96 |
+
except psi4.OptimizationConvergenceError:
|
| 97 |
+
print("WARNING: Final DFT refinement did not converge. Using the latest geometry.")
|
| 98 |
+
|
| 99 |
+
optimized_geometry = mol.save_string_xyz() # Get optimized geometry as XYZ formatted string
|
| 100 |
+
print(f"Geometry optimization completed in {time.time() - start_optimization:.2f} seconds.")
|
| 101 |
+
return mol, optimized_geometry
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
def dipole_polarizability(mol_input, delta=1e-4, nproc=1):
|
| 105 |
+
import numpy as np
|
| 106 |
+
import psi4
|
| 107 |
+
import datetime
|
| 108 |
+
from packaging.version import parse as version_parse
|
| 109 |
+
|
| 110 |
+
# Unit conversion and constants
|
| 111 |
+
atomic_conv = 1.648777e-41
|
| 112 |
+
conversion_factor = (atomic_conv * (1e10)**3) / (4 * np.pi * 8.854187817e-12)
|
| 113 |
+
au_to_debye = 2.541746
|
| 114 |
+
|
| 115 |
+
# Initialize arrays and error flag
|
| 116 |
+
tensor_diff = np.zeros((3, 3))
|
| 117 |
+
dipole_results = np.zeros((2, 3, 3))
|
| 118 |
+
calculation_error = False
|
| 119 |
+
|
| 120 |
+
# Create Psi4 molecule from XYZ string
|
| 121 |
+
#molecule = psi4.geometry(geom_xyz_str)
|
| 122 |
+
molecule = mol_input
|
| 123 |
+
|
| 124 |
+
# Determine appropriate basis set based on atoms present
|
| 125 |
+
atoms_in_mol = {molecule.symbol(i) for i in range(molecule.natom())}
|
| 126 |
+
if "I" in atoms_in_mol:
|
| 127 |
+
selected_basis = "LanL2DZ"
|
| 128 |
+
elif "Br" in atoms_in_mol:
|
| 129 |
+
selected_basis = "6-311G(d,p)"
|
| 130 |
+
else:
|
| 131 |
+
selected_basis = "6-311+G(2d,p)"
|
| 132 |
+
|
| 133 |
+
# Configure Psi4 settings
|
| 134 |
+
psi4.set_memory("4 GB")
|
| 135 |
+
psi4.set_num_threads(nproc)
|
| 136 |
+
psi4.set_options({
|
| 137 |
+
"basis": selected_basis,
|
| 138 |
+
"reference": "rhf",
|
| 139 |
+
"scf_type": "df",
|
| 140 |
+
"e_convergence": 1e-6,
|
| 141 |
+
"d_convergence": 1e-6,
|
| 142 |
+
})
|
| 143 |
+
|
| 144 |
+
print(f"Using basis set: {selected_basis}")
|
| 145 |
+
print("Commencing finite field polarizability calculation using Psi4...")
|
| 146 |
+
start_time = datetime.datetime.now()
|
| 147 |
+
|
| 148 |
+
def compute_dipole(perturb_val, axis_label, mol_instance):
|
| 149 |
+
try:
|
| 150 |
+
field_vector = [0.0, 0.0, 0.0]
|
| 151 |
+
axis_index = "xyz".index(axis_label.lower())
|
| 152 |
+
field_vector[axis_index] = perturb_val
|
| 153 |
+
psi4.set_options({
|
| 154 |
+
"perturb_h": True,
|
| 155 |
+
"perturb_with": "dipole",
|
| 156 |
+
"perturb_dipole": field_vector,
|
| 157 |
+
})
|
| 158 |
+
energy_val, wavefunction = psi4.energy('wb97m-d3bj/' + selected_basis, molecule=mol_instance, return_wfn=True)
|
| 159 |
+
psi4.oeprop(wavefunction, "DIPOLE")
|
| 160 |
+
if version_parse(psi4.__version__) < version_parse('1.3.100'):
|
| 161 |
+
dipole_values = np.array([
|
| 162 |
+
psi4.variable("SCF DIPOLE X") / au_to_debye,
|
| 163 |
+
psi4.variable("SCF DIPOLE Y") / au_to_debye,
|
| 164 |
+
psi4.variable("SCF DIPOLE Z") / au_to_debye,
|
| 165 |
+
])
|
| 166 |
+
else:
|
| 167 |
+
dipole_values = np.array(psi4.variable("SCF DIPOLE"))
|
| 168 |
+
return dipole_values, False
|
| 169 |
+
except psi4.SCFConvergenceError:
|
| 170 |
+
field_vector[axis_index] *= 0.5
|
| 171 |
+
try:
|
| 172 |
+
psi4.set_options({
|
| 173 |
+
"perturb_h": True,
|
| 174 |
+
"perturb_with": "dipole",
|
| 175 |
+
"perturb_dipole": field_vector,
|
| 176 |
+
})
|
| 177 |
+
energy_val, wavefunction = psi4.energy('wb97m-d3bj/' + selected_basis, molecule=mol_instance, return_wfn=True)
|
| 178 |
+
psi4.oeprop(wavefunction, "DIPOLE")
|
| 179 |
+
if version_parse(psi4.__version__) < version_parse('1.3.100'):
|
| 180 |
+
dipole_values = np.array([
|
| 181 |
+
psi4.variable("SCF DIPOLE X") / au_to_debye,
|
| 182 |
+
psi4.variable("SCF DIPOLE Y") / au_to_debye,
|
| 183 |
+
psi4.variable("SCF DIPOLE Z") / au_to_debye,
|
| 184 |
+
])
|
| 185 |
+
else:
|
| 186 |
+
dipole_values = np.array(psi4.variable("SCF DIPOLE"))
|
| 187 |
+
return dipole_values, False
|
| 188 |
+
except Exception as exc:
|
| 189 |
+
print(f"Failed calculation on axis {axis_label} with error: {exc}")
|
| 190 |
+
return np.array([np.nan, np.nan, np.nan]), True
|
| 191 |
+
except Exception as err:
|
| 192 |
+
print(f"Unexpected error for axis {axis_label}: {err}")
|
| 193 |
+
return np.array([np.nan, np.nan, np.nan]), True
|
| 194 |
+
|
| 195 |
+
# Prepare perturbation arguments for each axis direction and sign
|
| 196 |
+
perturb_args = [(delta, ax, molecule.clone()) for ax in "xyz"] + \
|
| 197 |
+
[(-delta, ax, molecule.clone()) for ax in "xyz"]
|
| 198 |
+
|
| 199 |
+
# Perform finite field calculations sequentially
|
| 200 |
+
computed_results = [compute_dipole(val, ax, mol_inst) for val, ax, mol_inst in perturb_args]
|
| 201 |
+
|
| 202 |
+
# Aggregate results and check for errors
|
| 203 |
+
for idx, (dip_outcome, err_flag) in enumerate(computed_results):
|
| 204 |
+
group = idx // 3
|
| 205 |
+
component = idx % 3
|
| 206 |
+
dipole_results[group, component] = dip_outcome
|
| 207 |
+
if err_flag:
|
| 208 |
+
calculation_error = True
|
| 209 |
+
|
| 210 |
+
# Compute the polarizability tensor and its average
|
| 211 |
+
tensor_diff = -(dipole_results[0] - dipole_results[1]) / (2 * delta) * conversion_factor
|
| 212 |
+
avg_polarizability = np.mean(np.diag(tensor_diff))
|
| 213 |
+
|
| 214 |
+
end_time = datetime.datetime.now()
|
| 215 |
+
if calculation_error:
|
| 216 |
+
print("Some errors occurred during the polarizability calculations.")
|
| 217 |
+
else:
|
| 218 |
+
print(f"Calculations completed normally in {end_time - start_time}.")
|
| 219 |
+
|
| 220 |
+
return avg_polarizability, tensor_diff
|
| 221 |
+
|
| 222 |
+
def electronic_properties(mol_input, nproc=1):
|
| 223 |
+
"""
|
| 224 |
+
Calculates electronic properties using Psi4 from an optimized geometry string.
|
| 225 |
+
|
| 226 |
+
The total energy, HOMO, LUMO, and dipole moment are calculated with a single-point
|
| 227 |
+
calculation using the ωB97M-D3BJ functional. The 6–311G(d,p) basis set is used for
|
| 228 |
+
H, C, N, O, F, P, S, Cl, and Br atoms, while the LanL2DZ basis set is used for I atoms.
|
| 229 |
+
|
| 230 |
+
Args:
|
| 231 |
+
optimized_geom_str (str): Optimized molecular geometry in XYZ format.
|
| 232 |
+
nproc (int): Number of processors to use.
|
| 233 |
+
|
| 234 |
+
Returns:
|
| 235 |
+
dict: A dictionary containing total energy (kcal/mol), HOMO and LUMO (eV),
|
| 236 |
+
and dipole moment (Debye).
|
| 237 |
+
"""
|
| 238 |
+
import psi4
|
| 239 |
+
|
| 240 |
+
psi4.core.clean() # Clean any leftover Psi4 resources
|
| 241 |
+
psi4.set_num_threads(nproc) # Set number of processors dynamically
|
| 242 |
+
psi4.set_memory('4 GB')
|
| 243 |
+
|
| 244 |
+
# Create Psi4 molecule from the optimized geometry string
|
| 245 |
+
#psi4_mol = psi4.geometry(optimized_geom_str)
|
| 246 |
+
psi4_mol = mol_input
|
| 247 |
+
|
| 248 |
+
# Set options for single-point energy calculation using ωB97M-D3BJ functional
|
| 249 |
+
# and the 6-311G(d,p) basis set by default.
|
| 250 |
+
psi4.set_options({
|
| 251 |
+
'basis': '6-311G(d,p)', # Basis set for H, C, N, O, F, P, S, Cl, Br atoms
|
| 252 |
+
'scf_type': 'df', # Density fitting for faster calculations
|
| 253 |
+
'reference': 'rhf', # Restricted Hartree-Fock
|
| 254 |
+
'd_convergence': 1e-6, # Tight SCF convergence
|
| 255 |
+
'e_convergence': 1e-6, # Tight energy convergence
|
| 256 |
+
})
|
| 257 |
+
|
| 258 |
+
# Adjust basis set for iodine if present
|
| 259 |
+
if "I" in [psi4_mol.symbol(i) for i in range(psi4_mol.natom())]:
|
| 260 |
+
psi4.set_basis("LanL2DZ", "I")
|
| 261 |
+
|
| 262 |
+
# Perform single-point energy calculation with ωB97M-D3BJ functional
|
| 263 |
+
energy, wavefunction = psi4.energy('wb97m-d3bj/6-311G(d,p)', molecule=psi4_mol, return_wfn=True)
|
| 264 |
+
|
| 265 |
+
# Convert energy to kcal/mol
|
| 266 |
+
total_energy_kcal = energy * 627.509
|
| 267 |
+
|
| 268 |
+
# Extract HOMO and LUMO from molecular orbital energies
|
| 269 |
+
mo_energies = wavefunction.epsilon_a().np # Alpha molecular orbital energies
|
| 270 |
+
homo = mo_energies[wavefunction.nalpha() - 1] # HOMO is the last occupied orbital
|
| 271 |
+
lumo = mo_energies[wavefunction.nalpha()] # LUMO is the first unoccupied orbital
|
| 272 |
+
|
| 273 |
+
# Convert HOMO and LUMO to eV
|
| 274 |
+
homo_eV = homo * 27.2114
|
| 275 |
+
lumo_eV = lumo * 27.2114
|
| 276 |
+
|
| 277 |
+
# Calculate dipole moment
|
| 278 |
+
dipole_components = wavefunction.variable('SCF DIPOLE') # Returns [X, Y, Z] components
|
| 279 |
+
dipole_moment_au = sum(d**2 for d in dipole_components)**0.5 # Magnitude in atomic units
|
| 280 |
+
|
| 281 |
+
# Convert dipole moment to Debye
|
| 282 |
+
dipole_moment_debye = dipole_moment_au * 2.541746
|
| 283 |
+
|
| 284 |
+
return {
|
| 285 |
+
'Total Energy (kcal/mol)': total_energy_kcal,
|
| 286 |
+
'HOMO (eV)': homo_eV,
|
| 287 |
+
'LUMO (eV)': lumo_eV,
|
| 288 |
+
'Dipole Moment (Debye)': dipole_moment_debye,
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
def refractive_index_with_density(psi4_mol, density, alpha):
|
| 292 |
+
"""
|
| 293 |
+
Estimate refractive index and dielectric constant using given density,
|
| 294 |
+
average polarizability, and molecular mass from psi4_mol.
|
| 295 |
+
|
| 296 |
+
Args:
|
| 297 |
+
psi4_mol: A Psi4 molecule object.
|
| 298 |
+
density (float): Density in g/cm³.
|
| 299 |
+
alpha (float): Average polarizability in ų.
|
| 300 |
+
|
| 301 |
+
Returns:
|
| 302 |
+
tuple: (refractive_index (unitless), dielectric_constant)
|
| 303 |
+
"""
|
| 304 |
+
import numpy as np
|
| 305 |
+
|
| 306 |
+
# Expanded atomic weights for common elements
|
| 307 |
+
atomic_weights = {
|
| 308 |
+
'H': 1.008, 'C': 12.011, 'N': 14.007, 'O': 15.999,
|
| 309 |
+
'F': 18.998, 'P': 30.974, 'S': 32.06, 'Cl': 35.45,
|
| 310 |
+
'Br': 79.904, 'I': 126.90, 'Si': 28.085, 'B': 10.81,
|
| 311 |
+
'Na': 22.990, 'Mg': 24.305, 'Al': 26.982, 'K': 39.098,
|
| 312 |
+
'Ca': 40.078, 'Fe': 55.845, 'Cu': 63.546, 'Zn': 65.38
|
| 313 |
+
# Add more elements as needed
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
natoms = psi4_mol.natom()
|
| 317 |
+
missing_atoms = set()
|
| 318 |
+
mass_u = 0.0
|
| 319 |
+
for i in range(natoms):
|
| 320 |
+
symbol = psi4_mol.symbol(i)
|
| 321 |
+
weight = atomic_weights.get(symbol)
|
| 322 |
+
if weight is None:
|
| 323 |
+
missing_atoms.add(symbol)
|
| 324 |
+
weight = 0.0
|
| 325 |
+
mass_u += weight
|
| 326 |
+
|
| 327 |
+
if missing_atoms:
|
| 328 |
+
print(f"Warning: Atomic weights for {', '.join(missing_atoms)} are not defined.")
|
| 329 |
+
|
| 330 |
+
# Molecular mass in g/mol
|
| 331 |
+
molecular_mass = mass_u
|
| 332 |
+
|
| 333 |
+
# Avogadro's number
|
| 334 |
+
NA = 6.022e23
|
| 335 |
+
|
| 336 |
+
# Calculate number density N (molecules/cm³) using given density
|
| 337 |
+
N = (density * NA) / molecular_mass
|
| 338 |
+
|
| 339 |
+
# Convert alpha from ų to cm³
|
| 340 |
+
alpha_cm3 = alpha * 1e-24
|
| 341 |
+
|
| 342 |
+
# Apply Lorentz-Lorenz equation
|
| 343 |
+
RHS = (4 * np.pi * N * alpha_cm3) / 3
|
| 344 |
+
if (1 - RHS) == 0:
|
| 345 |
+
raise ValueError("Division by zero encountered in refractive index calculation.")
|
| 346 |
+
n_squared = (1 + 2*RHS) / (1 - RHS)
|
| 347 |
+
if n_squared < 0:
|
| 348 |
+
raise ValueError("Invalid value encountered in refractive index calculation.")
|
| 349 |
+
|
| 350 |
+
refractive_index = np.sqrt(n_squared)
|
| 351 |
+
dielectric_constant = n_squared # dielectric constant equals n²
|
| 352 |
+
|
| 353 |
+
return refractive_index, dielectric_constant
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
def refractive_index(psi4_mol, alpha):
|
| 358 |
+
"""
|
| 359 |
+
Estimate refractive index and dielectric constant using a simple bounding box
|
| 360 |
+
volume estimation and the Lorentz-Lorenz equation.
|
| 361 |
+
|
| 362 |
+
Args:
|
| 363 |
+
psi4_mol: A Psi4 molecule object.
|
| 364 |
+
alpha (float): Average polarizability in ų.
|
| 365 |
+
|
| 366 |
+
Returns:
|
| 367 |
+
tuple: (refractive_index (unitless), dielectric_constant)
|
| 368 |
+
"""
|
| 369 |
+
import numpy as np
|
| 370 |
+
|
| 371 |
+
natoms = psi4_mol.natom()
|
| 372 |
+
coords_list = []
|
| 373 |
+
for i in range(natoms):
|
| 374 |
+
vec = psi4_mol.xyz(i)
|
| 375 |
+
coords_list.append([float(vec[0]), float(vec[1]), float(vec[2])])
|
| 376 |
+
|
| 377 |
+
coords = np.array(coords_list)
|
| 378 |
+
|
| 379 |
+
# Calculate bounding box volume in ų
|
| 380 |
+
min_coords = coords.min(axis=0)
|
| 381 |
+
max_coords = coords.max(axis=0)
|
| 382 |
+
volume_angstrom_cubed = np.prod(max_coords - min_coords)
|
| 383 |
+
|
| 384 |
+
# Apply Lorentz-Lorenz equation simplified:
|
| 385 |
+
# Since N = 1/volume and alpha in ų, RHS simplifies to 4*pi*alpha/(3*volume)
|
| 386 |
+
RHS = (4 * np.pi * alpha) / (3 * volume_angstrom_cubed)
|
| 387 |
+
|
| 388 |
+
if (1 - RHS) == 0:
|
| 389 |
+
raise ValueError("Division by zero encountered in refractive index calculation.")
|
| 390 |
+
n_squared = (1 + 2*RHS) / (1 - RHS)
|
| 391 |
+
if n_squared < 0:
|
| 392 |
+
raise ValueError("Invalid value encountered in refractive index calculation.")
|
| 393 |
+
|
| 394 |
+
refractive_index = np.sqrt(n_squared)
|
| 395 |
+
dielectric_constant = n_squared # Dielectric constant is n²
|
| 396 |
+
|
| 397 |
+
return refractive_index, dielectric_constant
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
def process_smiles(pid, smiles, output_dir, nproc=1):
|
| 403 |
+
"""
|
| 404 |
+
Processes a single SMILES string: generates the molecule, saves the initial
|
| 405 |
+
geometry as an XYZ file, optimizes the geometry, calculates dipole polarizability
|
| 406 |
+
and electronic properties, and saves results to files.
|
| 407 |
+
"""
|
| 408 |
+
try:
|
| 409 |
+
# Generate molecule and save initial geometry
|
| 410 |
+
mol = generate_molecule(smiles)
|
| 411 |
+
initial_xyz_str = generate_xyz_string(mol)
|
| 412 |
+
initial_xyz_file = os.path.join(output_dir, f"{pid}_initial.xyz")
|
| 413 |
+
with open(initial_xyz_file, "w") as f:
|
| 414 |
+
f.write(initial_xyz_str)
|
| 415 |
+
print(f"Saved initial geometry to {initial_xyz_file}")
|
| 416 |
+
|
| 417 |
+
# Optimize geometry using the modified function
|
| 418 |
+
optimized_mol, optimized_geom_str = geometry_optimization(initial_xyz_file, num_processors=nproc)
|
| 419 |
+
print(f"Optimized geometry obtained for PID {pid}.")
|
| 420 |
+
|
| 421 |
+
# Save optimized geometry to file
|
| 422 |
+
optimized_xyz_file = os.path.join(output_dir, f"{pid}_optimized.xyz")
|
| 423 |
+
with open(optimized_xyz_file, "w") as f:
|
| 424 |
+
f.write(optimized_geom_str)
|
| 425 |
+
print(f"Optimized geometry saved to {optimized_xyz_file}")
|
| 426 |
+
|
| 427 |
+
# Calculate dipole polarizability
|
| 428 |
+
alpha, polarizability_tensor = dipole_polarizability(optimized_mol, nproc=nproc)
|
| 429 |
+
print(f"PID {pid} - Average polarizability: {alpha:.3f} angstrom^3")
|
| 430 |
+
print(f"PID {pid} - Polarizability tensor:\n{polarizability_tensor}")
|
| 431 |
+
|
| 432 |
+
# Save polarizability results
|
| 433 |
+
with open(os.path.join(output_dir, f"{pid}_avg_polarizability.dat"), "w") as f:
|
| 434 |
+
f.write(f"{alpha:.3f}\n")
|
| 435 |
+
with open(os.path.join(output_dir, f"{pid}_polarizability_tensor.dat"), "w") as f:
|
| 436 |
+
f.write(f"{polarizability_tensor}\n")
|
| 437 |
+
|
| 438 |
+
# Calculate refractive index and dielectric constant
|
| 439 |
+
refractive_ind, dielectric_constant = refractive_index(optimized_mol, alpha)
|
| 440 |
+
print(f" Refractive Index: {refractive_ind:.3f}, Dielectric Constant: {dielectric_constant:.3f}")
|
| 441 |
+
|
| 442 |
+
# Save refractive index and dielectric constant
|
| 443 |
+
with open(os.path.join(output_dir, f"{pid}_refractive_index_monomer.dat"), "w") as f:
|
| 444 |
+
f.write(f"{refractive_ind}\n")
|
| 445 |
+
with open(os.path.join(output_dir, f"{pid}_electronic_dielectric_constant_monomer.dat"), "w") as f:
|
| 446 |
+
f.write(f"{dielectric_constant}\n")
|
| 447 |
+
|
| 448 |
+
# Calculate electronic properties
|
| 449 |
+
properties = electronic_properties(optimized_mol, nproc=nproc)
|
| 450 |
+
print(f"Electronic properties for PID {pid}:")
|
| 451 |
+
for key, value in properties.items():
|
| 452 |
+
print(f" {key}: {value}")
|
| 453 |
+
|
| 454 |
+
# Save electronic properties
|
| 455 |
+
property_files = {
|
| 456 |
+
"total_energy.dat": "Total Energy (kcal/mol)",
|
| 457 |
+
"homo.dat": "HOMO (eV)",
|
| 458 |
+
"lumo.dat": "LUMO (eV)",
|
| 459 |
+
"dipole_moment.dat": "Dipole Moment (Debye)"
|
| 460 |
+
}
|
| 461 |
+
for file_name, property_key in property_files.items():
|
| 462 |
+
with open(os.path.join(output_dir, f"{pid}_{file_name}"), "w") as f:
|
| 463 |
+
f.write(f"{properties[property_key]}\n")
|
| 464 |
+
|
| 465 |
+
except Exception as e:
|
| 466 |
+
print(f"Error processing PID {pid}: {e}")
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
if __name__ == "__main__":
|
| 470 |
+
if len(sys.argv) != 3:
|
| 471 |
+
print("Usage: python script.py <PID> <NPROC>")
|
| 472 |
+
sys.exit(1)
|
| 473 |
+
|
| 474 |
+
pid = sys.argv[1]
|
| 475 |
+
nproc = int(sys.argv[2])
|
| 476 |
+
smiles_csv = "../../../SMILES.csv"
|
| 477 |
+
|
| 478 |
+
output_dir = os.getcwd()
|
| 479 |
+
#os.makedirs(output_dir, exist_ok=True)
|
| 480 |
+
|
| 481 |
+
start_time = time.time()
|
| 482 |
+
|
| 483 |
+
# Load SMILES from CSV
|
| 484 |
+
smiles = None
|
| 485 |
+
try:
|
| 486 |
+
with open(smiles_csv, "r") as f:
|
| 487 |
+
reader = csv.reader(f)
|
| 488 |
+
for row in reader:
|
| 489 |
+
if row[0] == pid:
|
| 490 |
+
smiles = row[1]
|
| 491 |
+
break
|
| 492 |
+
if smiles is None:
|
| 493 |
+
raise ValueError(f"PID {pid} not found in {smiles_csv}")
|
| 494 |
+
|
| 495 |
+
print(f"Processing PID: {pid} with SMILES: {smiles}")
|
| 496 |
+
process_smiles(pid, smiles, output_dir, nproc=nproc)
|
| 497 |
+
|
| 498 |
+
except Exception as e:
|
| 499 |
+
print(f"Error: {e}")
|
| 500 |
+
sys.exit(1)
|
| 501 |
+
|
| 502 |
+
end_time = time.time()
|
| 503 |
+
elapsed_time = end_time - start_time
|
| 504 |
+
print(f"Total script execution time: {elapsed_time:.2f} seconds")
|
| 505 |
+
|
data/ADEPT/2.Simulations/lammps_TC.in
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
log ${name}_TC.log
|
| 3 |
+
|
| 4 |
+
units real
|
| 5 |
+
atom_style full
|
| 6 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 7 |
+
kspace_style pppm 1e-4
|
| 8 |
+
bond_style harmonic
|
| 9 |
+
angle_style harmonic
|
| 10 |
+
dihedral_style fourier
|
| 11 |
+
improper_style cvff
|
| 12 |
+
special_bonds amber
|
| 13 |
+
pair_modify mix arithmetic
|
| 14 |
+
read_data ../../OPTIMIZATION/${name}/${name}_eq2.data
|
| 15 |
+
|
| 16 |
+
replicate 3 1 1
|
| 17 |
+
|
| 18 |
+
#restart 100000 ${name}_rstrt_3 ${name}_rstrt_4
|
| 19 |
+
|
| 20 |
+
timestep 0.25
|
| 21 |
+
|
| 22 |
+
neighbor 2.5 bin
|
| 23 |
+
neigh_modify delay 0 every 50 check no
|
| 24 |
+
#neigh_modify delay 0 every 1 check yes
|
| 25 |
+
|
| 26 |
+
#dump 1 all xyz 400000 ${name}.xyz
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
region rqin block $((xlo+xhi)/2-40) $((xlo+xhi)/2-35) INF INF INF INF units box
|
| 30 |
+
region rqout block $((xlo+xhi)/2+35) $((xlo+xhi)/2+40) INF INF INF INF units box
|
| 31 |
+
region rfree block $((xlo+xhi)/2-40) $((xlo+xhi)/2+40) INF INF INF INF units box
|
| 32 |
+
group gin dynamic all region rqin
|
| 33 |
+
group gout dynamic all region rqout
|
| 34 |
+
group gfree region rfree
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
#################### NEME Calculation #####################
|
| 38 |
+
|
| 39 |
+
fix NVE gfree nve
|
| 40 |
+
reset_timestep 0
|
| 41 |
+
|
| 42 |
+
compute ke gfree ke/atom
|
| 43 |
+
variable temp atom c_ke/0.003
|
| 44 |
+
|
| 45 |
+
variable OneOverNumBins equal 1.0/(round((xhi-xlo)/1.2))
|
| 46 |
+
compute xbin all chunk/atom bin/1d x center ${OneOverNumBins} units reduced
|
| 47 |
+
fix 1 all ave/chunk 1 2000000 2000000 xbin v_temp norm all ave one file ${name}_temp.profile
|
| 48 |
+
|
| 49 |
+
fix 4 gin langevin 320 320 $(100.0*dt) 123456 tally yes
|
| 50 |
+
fix 5 gout langevin 280 280 $(100.0*dt) 123457 tally yes
|
| 51 |
+
|
| 52 |
+
thermo 10000
|
| 53 |
+
thermo_style custom step temp epair emol etotal press density vol lx ly lz f_4 f_5
|
| 54 |
+
thermo_modify flush yes
|
| 55 |
+
|
| 56 |
+
variable my_step equal step
|
| 57 |
+
variable my_temp equal temp
|
| 58 |
+
variable my_epair equal epair
|
| 59 |
+
variable my_emol equal emol
|
| 60 |
+
variable my_etot equal etotal
|
| 61 |
+
variable my_press equal press
|
| 62 |
+
variable my_rho equal density
|
| 63 |
+
variable my_vol equal vol
|
| 64 |
+
variable my_lx equal lx
|
| 65 |
+
variable my_ly equal ly
|
| 66 |
+
variable my_lz equal lz
|
| 67 |
+
variable my_f4 equal f_4
|
| 68 |
+
variable my_f5 equal f_5
|
| 69 |
+
|
| 70 |
+
fix thermo_out all print 10000 "${my_step} ${my_temp} ${my_epair} ${my_emol} ${my_etot} ${my_press} ${my_rho} ${my_vol} ${my_lx} ${my_ly} ${my_lz} ${my_f4} ${my_f5}" file ${name}_thermo.dat screen no title ""
|
| 71 |
+
|
| 72 |
+
#run 200
|
| 73 |
+
run 20000000
|
| 74 |
+
clear
|
data/ADEPT/2.Simulations/lammps_Tg.in
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###############################################################################
|
| 2 |
+
# Tg Scan (NPT) — minimal, matched to your FF & data path (with Tmin clamp)
|
| 3 |
+
###############################################################################
|
| 4 |
+
|
| 5 |
+
# ---------------- User Vars (override via -var) ----------------
|
| 6 |
+
variable scan_range equal 150
|
| 7 |
+
variable tstep equal 10
|
| 8 |
+
variable eq_ns equal 0.5
|
| 9 |
+
variable prod_ns equal 0.5
|
| 10 |
+
variable timestep_fs equal 1
|
| 11 |
+
|
| 12 |
+
# Expect: -var Tg_input <K> -var name <system>
|
| 13 |
+
|
| 14 |
+
# ---------------- Derived (Tmin clamp via ternary, no spaces in expr) --------
|
| 15 |
+
variable Tmin equal 50
|
| 16 |
+
variable tstart equal v_Tg_input+v_scan_range
|
| 17 |
+
variable tend_raw equal v_Tg_input-v_scan_range
|
| 18 |
+
variable tend equal ternary(v_tend_raw>v_Tmin,v_tend_raw,v_Tmin)
|
| 19 |
+
|
| 20 |
+
variable eq_steps equal ceil(v_eq_ns*1000000.0/v_timestep_fs)
|
| 21 |
+
variable prod_steps equal ceil(v_prod_ns*1000000.0/v_timestep_fs)
|
| 22 |
+
variable nsteps equal floor((v_tstart-v_tend)/v_tstep+1)
|
| 23 |
+
|
| 24 |
+
# guard against degenerate ranges
|
| 25 |
+
if "${nsteps}<1" then &
|
| 26 |
+
"variable nsteps equal 1" &
|
| 27 |
+
"variable tend equal ${tstart}"
|
| 28 |
+
|
| 29 |
+
print "Tg_input=${Tg_input}K"
|
| 30 |
+
print "scan_range=+/-${scan_range}K,step=${tstep}K"
|
| 31 |
+
print "Tmin=${Tmin}K"
|
| 32 |
+
print "tstart=${tstart}K,tend=${tend}K,nsteps=${nsteps}"
|
| 33 |
+
|
| 34 |
+
# ---------------- Setup (your force field) --------------
|
| 35 |
+
units real
|
| 36 |
+
dimension 3
|
| 37 |
+
boundary p p p
|
| 38 |
+
atom_style full
|
| 39 |
+
|
| 40 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 41 |
+
bond_style harmonic
|
| 42 |
+
angle_style harmonic
|
| 43 |
+
dihedral_style fourier
|
| 44 |
+
improper_style cvff
|
| 45 |
+
special_bonds amber
|
| 46 |
+
pair_modify mix arithmetic
|
| 47 |
+
kspace_style pppm 1e-6
|
| 48 |
+
neighbor 3.0 bin
|
| 49 |
+
neigh_modify every 1 delay 0 check yes
|
| 50 |
+
|
| 51 |
+
# Data
|
| 52 |
+
read_data ../../OPTIMIZATION/${name}/${name}_eq2.data
|
| 53 |
+
|
| 54 |
+
# Integrator/timestep
|
| 55 |
+
timestep ${timestep_fs}
|
| 56 |
+
reset_timestep 0
|
| 57 |
+
|
| 58 |
+
# ---------------- Output (lean) ----------------
|
| 59 |
+
thermo 1000
|
| 60 |
+
thermo_style custom step temp press vol density lx ly lz
|
| 61 |
+
thermo_modify flush yes
|
| 62 |
+
|
| 63 |
+
variable myTemp equal temp
|
| 64 |
+
variable myDensity equal density
|
| 65 |
+
variable myPress equal press
|
| 66 |
+
variable myVol equal vol
|
| 67 |
+
fix densout all ave/time 100 1 100 v_myTemp v_myDensity v_myPress v_myVol file ${name}_tg_density.dat
|
| 68 |
+
|
| 69 |
+
# ---------------- Temperature loop ----------------
|
| 70 |
+
variable i loop ${nsteps}
|
| 71 |
+
label temp_loop
|
| 72 |
+
|
| 73 |
+
variable currT equal ${tstart}-(${i}-1)*${tstep}
|
| 74 |
+
fix tg_npt all npt temp ${currT} ${currT} 100.0 iso 1.0 1.0 1000.0
|
| 75 |
+
run ${eq_steps}
|
| 76 |
+
run ${prod_steps}
|
| 77 |
+
unfix tg_npt
|
| 78 |
+
|
| 79 |
+
next i
|
| 80 |
+
jump SELF temp_loop
|
| 81 |
+
|
| 82 |
+
# ---------------- Cleanup ----------------
|
| 83 |
+
unfix densout
|
| 84 |
+
clear
|
data/ADEPT/2.Simulations/lammps_dc.in
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
log ${name}_dc.log
|
| 2 |
+
|
| 3 |
+
units real
|
| 4 |
+
atom_style full
|
| 5 |
+
|
| 6 |
+
# Define force fields (these need to be adapted based on your system)
|
| 7 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 8 |
+
kspace_style pppm 1e-6
|
| 9 |
+
bond_style harmonic
|
| 10 |
+
angle_style harmonic
|
| 11 |
+
dihedral_style fourier
|
| 12 |
+
improper_style cvff
|
| 13 |
+
special_bonds amber
|
| 14 |
+
pair_modify mix arithmetic
|
| 15 |
+
|
| 16 |
+
# Read the system data
|
| 17 |
+
read_data ../../OPTIMIZATION/${name}/${name}_eq2.data
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
# Define the timestep
|
| 21 |
+
timestep 1.0
|
| 22 |
+
|
| 23 |
+
# Neighbor settings
|
| 24 |
+
neighbor 2.5 bin
|
| 25 |
+
#neigh_modify delay 0 every 50 check no
|
| 26 |
+
neigh_modify delay 0 every 1 check yes
|
| 27 |
+
fix SHAKE2 all shake 1e-4 1000 0 m 1.0
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
fix 1 all nvt temp 300.0 300.0 100.0
|
| 32 |
+
|
| 33 |
+
compute myDipole1 all dipole
|
| 34 |
+
variable dipole1 equal c_myDipole1[1]
|
| 35 |
+
variable dipole2 equal c_myDipole1[2]
|
| 36 |
+
variable dipole3 equal c_myDipole1[3]
|
| 37 |
+
variable dipole4 equal c_myDipole1
|
| 38 |
+
variable volume equal vol
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
fix dipolePrint all print 1000 "${dipole1} ${dipole2} ${dipole3} ${dipole4} ${volume} " file ${name}_dipole_fluctuation.dat screen no
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
thermo_style custom step temp press density vol
|
| 47 |
+
thermo 1000
|
| 48 |
+
|
| 49 |
+
run 5000000
|
data/ADEPT/2.Simulations/lammps_emd.in
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
log log.elastic_T
|
| 2 |
+
####################################
|
| 3 |
+
# 1st stage equilibration
|
| 4 |
+
####################################
|
| 5 |
+
units real
|
| 6 |
+
atom_style full
|
| 7 |
+
boundary p p p
|
| 8 |
+
|
| 9 |
+
bond_style harmonic
|
| 10 |
+
angle_style harmonic
|
| 11 |
+
dihedral_style fourier
|
| 12 |
+
improper_style cvff
|
| 13 |
+
|
| 14 |
+
pair_style lj/cut/coul/long 8.0 12.0
|
| 15 |
+
pair_modify mix arithmetic
|
| 16 |
+
special_bonds amber
|
| 17 |
+
neighbor 3.0 bin
|
| 18 |
+
neigh_modify delay 0 every 1
|
| 19 |
+
kspace_style pppm 1e-6
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
read_data ../../OPTIMIZATION/${name}/${name}_eq2.data
|
| 23 |
+
|
| 24 |
+
fix SHAKE3 all shake 1e-4 1000 0 m 1.0
|
| 25 |
+
|
| 26 |
+
fix NPT all npt temp 300 300 100 iso 1.0 1.0 1000
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
variable volume equal vol
|
| 30 |
+
variable temperature equal temp
|
| 31 |
+
variable energy equal etotal
|
| 32 |
+
variable pressure equal press
|
| 33 |
+
variable dens equal density
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
fix propertiesPrint all print 100 "${temperature} ${energy} ${pressure} ${volume} ${dens}" file ${name}_npt_properties.dat screen no
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
run 8000000 every 80000 "write_data eq2_*.data"
|
| 41 |
+
unfix NPT
|
| 42 |
+
unfix propertiesPrint
|
| 43 |
+
unfix SHAKE3
|
| 44 |
+
clear
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
shell cp ../../../2.Simulations/modulus_files/displace.mod .
|
| 48 |
+
shell cp ../../../2.Simulations/modulus_files/post_vrh.mod .
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
####################################
|
| 52 |
+
# 2nd Modulus Calculation
|
| 53 |
+
####################################
|
| 54 |
+
include ../../../2.Simulations/modulus_files/in_1.elastic
|
| 55 |
+
include ../../../2.Simulations/modulus_files/in_2.elastic
|
| 56 |
+
include ../../../2.Simulations/modulus_files/in_3.elastic
|
| 57 |
+
include ../../../2.Simulations/modulus_files/in_4.elastic
|
| 58 |
+
include ../../../2.Simulations/modulus_files/in_5.elastic
|
| 59 |
+
include ../../../2.Simulations/modulus_files/in_6.elastic
|
| 60 |
+
include ../../../2.Simulations/modulus_files/in_7.elastic
|
| 61 |
+
include ../../../2.Simulations/modulus_files/in_8.elastic
|
| 62 |
+
include ../../../2.Simulations/modulus_files/in_9.elastic
|
| 63 |
+
include ../../../2.Simulations/modulus_files/in_10.elastic
|
| 64 |
+
include ../../../2.Simulations/modulus_files/in_11.elastic
|
| 65 |
+
include ../../../2.Simulations/modulus_files/in_12.elastic
|
| 66 |
+
include ../../../2.Simulations/modulus_files/in_13.elastic
|
| 67 |
+
include ../../../2.Simulations/modulus_files/in_14.elastic
|
| 68 |
+
include ../../../2.Simulations/modulus_files/in_15.elastic
|
| 69 |
+
include ../../../2.Simulations/modulus_files/in_16.elastic
|
| 70 |
+
include ../../../2.Simulations/modulus_files/in_17.elastic
|
| 71 |
+
include ../../../2.Simulations/modulus_files/in_18.elastic
|
| 72 |
+
include ../../../2.Simulations/modulus_files/in_19.elastic
|
| 73 |
+
include ../../../2.Simulations/modulus_files/in_20.elastic
|
| 74 |
+
include ../../../2.Simulations/modulus_files/in_21.elastic
|
| 75 |
+
include ../../../2.Simulations/modulus_files/in_22.elastic
|
| 76 |
+
include ../../../2.Simulations/modulus_files/in_23.elastic
|
| 77 |
+
include ../../../2.Simulations/modulus_files/in_24.elastic
|
| 78 |
+
include ../../../2.Simulations/modulus_files/in_25.elastic
|
| 79 |
+
include ../../../2.Simulations/modulus_files/in_26.elastic
|
| 80 |
+
include ../../../2.Simulations/modulus_files/in_27.elastic
|
| 81 |
+
include ../../../2.Simulations/modulus_files/in_28.elastic
|
| 82 |
+
include ../../../2.Simulations/modulus_files/in_29.elastic
|
| 83 |
+
include ../../../2.Simulations/modulus_files/in_30.elastic
|
| 84 |
+
include ../../../2.Simulations/modulus_files/in_31.elastic
|
| 85 |
+
include ../../../2.Simulations/modulus_files/in_32.elastic
|
| 86 |
+
include ../../../2.Simulations/modulus_files/in_33.elastic
|
| 87 |
+
include ../../../2.Simulations/modulus_files/in_34.elastic
|
| 88 |
+
include ../../../2.Simulations/modulus_files/in_35.elastic
|
| 89 |
+
include ../../../2.Simulations/modulus_files/in_36.elastic
|
| 90 |
+
include ../../../2.Simulations/modulus_files/in_37.elastic
|
| 91 |
+
include ../../../2.Simulations/modulus_files/in_38.elastic
|
| 92 |
+
include ../../../2.Simulations/modulus_files/in_39.elastic
|
| 93 |
+
include ../../../2.Simulations/modulus_files/in_40.elastic
|
| 94 |
+
include ../../../2.Simulations/modulus_files/in_41.elastic
|
| 95 |
+
include ../../../2.Simulations/modulus_files/in_42.elastic
|
| 96 |
+
include ../../../2.Simulations/modulus_files/in_43.elastic
|
| 97 |
+
include ../../../2.Simulations/modulus_files/in_44.elastic
|
| 98 |
+
include ../../../2.Simulations/modulus_files/in_45.elastic
|
| 99 |
+
include ../../../2.Simulations/modulus_files/in_46.elastic
|
| 100 |
+
include ../../../2.Simulations/modulus_files/in_47.elastic
|
| 101 |
+
include ../../../2.Simulations/modulus_files/in_48.elastic
|
| 102 |
+
include ../../../2.Simulations/modulus_files/in_49.elastic
|
| 103 |
+
include ../../../2.Simulations/modulus_files/in_50.elastic
|
| 104 |
+
include ../../../2.Simulations/modulus_files/in_51.elastic
|
| 105 |
+
include ../../../2.Simulations/modulus_files/in_52.elastic
|
| 106 |
+
include ../../../2.Simulations/modulus_files/in_53.elastic
|
| 107 |
+
include ../../../2.Simulations/modulus_files/in_54.elastic
|
| 108 |
+
include ../../../2.Simulations/modulus_files/in_55.elastic
|
| 109 |
+
include ../../../2.Simulations/modulus_files/in_56.elastic
|
| 110 |
+
include ../../../2.Simulations/modulus_files/in_57.elastic
|
| 111 |
+
include ../../../2.Simulations/modulus_files/in_58.elastic
|
| 112 |
+
include ../../../2.Simulations/modulus_files/in_59.elastic
|
| 113 |
+
include ../../../2.Simulations/modulus_files/in_60.elastic
|
| 114 |
+
include ../../../2.Simulations/modulus_files/in_61.elastic
|
| 115 |
+
include ../../../2.Simulations/modulus_files/in_62.elastic
|
| 116 |
+
include ../../../2.Simulations/modulus_files/in_63.elastic
|
| 117 |
+
include ../../../2.Simulations/modulus_files/in_64.elastic
|
| 118 |
+
include ../../../2.Simulations/modulus_files/in_65.elastic
|
| 119 |
+
include ../../../2.Simulations/modulus_files/in_66.elastic
|
| 120 |
+
include ../../../2.Simulations/modulus_files/in_67.elastic
|
| 121 |
+
include ../../../2.Simulations/modulus_files/in_68.elastic
|
| 122 |
+
include ../../../2.Simulations/modulus_files/in_69.elastic
|
| 123 |
+
include ../../../2.Simulations/modulus_files/in_70.elastic
|
| 124 |
+
include ../../../2.Simulations/modulus_files/in_71.elastic
|
| 125 |
+
include ../../../2.Simulations/modulus_files/in_72.elastic
|
| 126 |
+
include ../../../2.Simulations/modulus_files/in_73.elastic
|
| 127 |
+
include ../../../2.Simulations/modulus_files/in_74.elastic
|
| 128 |
+
include ../../../2.Simulations/modulus_files/in_75.elastic
|
| 129 |
+
include ../../../2.Simulations/modulus_files/in_76.elastic
|
| 130 |
+
include ../../../2.Simulations/modulus_files/in_77.elastic
|
| 131 |
+
include ../../../2.Simulations/modulus_files/in_78.elastic
|
| 132 |
+
include ../../../2.Simulations/modulus_files/in_79.elastic
|
| 133 |
+
include ../../../2.Simulations/modulus_files/in_80.elastic
|
| 134 |
+
include ../../../2.Simulations/modulus_files/in_81.elastic
|
| 135 |
+
include ../../../2.Simulations/modulus_files/in_82.elastic
|
| 136 |
+
include ../../../2.Simulations/modulus_files/in_83.elastic
|
| 137 |
+
include ../../../2.Simulations/modulus_files/in_84.elastic
|
| 138 |
+
include ../../../2.Simulations/modulus_files/in_85.elastic
|
| 139 |
+
include ../../../2.Simulations/modulus_files/in_86.elastic
|
| 140 |
+
include ../../../2.Simulations/modulus_files/in_87.elastic
|
| 141 |
+
include ../../../2.Simulations/modulus_files/in_88.elastic
|
| 142 |
+
include ../../../2.Simulations/modulus_files/in_89.elastic
|
| 143 |
+
include ../../../2.Simulations/modulus_files/in_90.elastic
|
| 144 |
+
include ../../../2.Simulations/modulus_files/in_91.elastic
|
| 145 |
+
include ../../../2.Simulations/modulus_files/in_92.elastic
|
| 146 |
+
include ../../../2.Simulations/modulus_files/in_93.elastic
|
| 147 |
+
include ../../../2.Simulations/modulus_files/in_94.elastic
|
| 148 |
+
include ../../../2.Simulations/modulus_files/in_95.elastic
|
| 149 |
+
include ../../../2.Simulations/modulus_files/in_96.elastic
|
| 150 |
+
include ../../../2.Simulations/modulus_files/in_97.elastic
|
| 151 |
+
include ../../../2.Simulations/modulus_files/in_98.elastic
|
| 152 |
+
include ../../../2.Simulations/modulus_files/in_99.elastic
|
| 153 |
+
include ../../../2.Simulations/modulus_files/in_100.elastic
|
| 154 |
+
|
data/ADEPT/2.Simulations/lammps_eq1.in
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
log ${name}_eq1.log
|
| 2 |
+
####################################
|
| 3 |
+
# 1st stage equilibration
|
| 4 |
+
####################################
|
| 5 |
+
echo screen
|
| 6 |
+
units real
|
| 7 |
+
atom_style full
|
| 8 |
+
boundary p p p
|
| 9 |
+
|
| 10 |
+
bond_style harmonic
|
| 11 |
+
angle_style harmonic
|
| 12 |
+
dihedral_style fourier
|
| 13 |
+
improper_style cvff
|
| 14 |
+
|
| 15 |
+
# Turn off coulomb interaction
|
| 16 |
+
pair_style lj/cut 8.0
|
| 17 |
+
|
| 18 |
+
pair_modify mix arithmetic
|
| 19 |
+
special_bonds amber
|
| 20 |
+
neighbor 3.0 bin
|
| 21 |
+
neigh_modify delay 0
|
| 22 |
+
#neigh_modify delay 0 every 1 check yes
|
| 23 |
+
|
| 24 |
+
kspace_style none
|
| 25 |
+
|
| 26 |
+
read_data ../../MODEL/${name}/amorphous_polymer_${name}.lmps
|
| 27 |
+
|
| 28 |
+
#dump 1 all xtc 1000 ${name}_lmp_eq1.xtc
|
| 29 |
+
#dump_modify 1 unwrap yes
|
| 30 |
+
thermo 1000
|
| 31 |
+
thermo_style custom step temp press etotal ke pe ebond eangle edihed eimp evdwl ecoul elong vol density lx ly lz
|
| 32 |
+
thermo_modify flush yes
|
| 33 |
+
#restart 100000 ${name}_lmp1.rst ${name}_lmp2.rst
|
| 34 |
+
|
| 35 |
+
# Minimization
|
| 36 |
+
min_style sd
|
| 37 |
+
minimize 1.0e-6 1.0e-7 10000 10000
|
| 38 |
+
|
| 39 |
+
min_style fire
|
| 40 |
+
minimize 1.0e-6 1.0e-7 10000 10000
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
#minimize 0.001 0.001 10000 100000
|
| 46 |
+
#undump 1
|
| 47 |
+
|
| 48 |
+
reset_timestep 0
|
| 49 |
+
|
| 50 |
+
# 1st step: NVT
|
| 51 |
+
timestep 0.1
|
| 52 |
+
fix NVT1 all nvt temp 100 100 $(100.0*dt)
|
| 53 |
+
run 20000
|
| 54 |
+
unfix NVT1
|
| 55 |
+
|
| 56 |
+
# 2nd step: NVT, T rising
|
| 57 |
+
timestep 1.0
|
| 58 |
+
fix SHAKE1 all shake 1e-4 1000 0 m 1.0
|
| 59 |
+
fix NVT2 all nvt temp 100 1000 $(100.0*dt)
|
| 60 |
+
run 1000000
|
| 61 |
+
unfix NVT2
|
| 62 |
+
|
| 63 |
+
# 3rd step: NPT, P and T const.
|
| 64 |
+
fix NPT1 all npt temp 1000 1000 $(100.0*dt) iso 0.1 0.1 $(1000.0*dt)
|
| 65 |
+
run 50000
|
| 66 |
+
unfix NPT1
|
| 67 |
+
|
| 68 |
+
# 4th step: NPT, P rising
|
| 69 |
+
fix NPT2 all npt temp 1000 1000 $(100.0*dt) iso 0.1 500.0 $(1000.0*dt)
|
| 70 |
+
run 1000000
|
| 71 |
+
unfix NPT2
|
| 72 |
+
|
| 73 |
+
write_data ${name}_eq1.data
|
| 74 |
+
clear
|
| 75 |
+
|
| 76 |
+
|
data/ADEPT/2.Simulations/lammps_eq2.in
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
log ${name}_eq2.log
|
| 2 |
+
####################################
|
| 3 |
+
# 2nd stage equilibration
|
| 4 |
+
####################################
|
| 5 |
+
units real
|
| 6 |
+
atom_style full
|
| 7 |
+
boundary p p p
|
| 8 |
+
|
| 9 |
+
bond_style harmonic
|
| 10 |
+
angle_style harmonic
|
| 11 |
+
dihedral_style fourier
|
| 12 |
+
improper_style cvff
|
| 13 |
+
|
| 14 |
+
pair_style lj/cut/coul/long 8.0 12.0
|
| 15 |
+
pair_modify mix arithmetic
|
| 16 |
+
special_bonds amber
|
| 17 |
+
neighbor 3.0 bin
|
| 18 |
+
neigh_modify delay 0 every 1 check yes
|
| 19 |
+
#neigh_modify delay 0 every 1 check yes
|
| 20 |
+
|
| 21 |
+
kspace_style pppm 1e-4
|
| 22 |
+
|
| 23 |
+
read_data ${name}_eq1.data
|
| 24 |
+
|
| 25 |
+
#dump 2 all xtc 1000 ${name}_lmp_eq2_i.xtc
|
| 26 |
+
#dump_modify 2 unwrap yes
|
| 27 |
+
thermo 1000
|
| 28 |
+
thermo_style custom step temp press etotal ke pe ebond eangle edihed eimp evdwl ecoul elong vol density lx ly lz
|
| 29 |
+
thermo_modify flush yes
|
| 30 |
+
#restart 100000 ${name}_lmp1.rst ${name}_lmp2.rst
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
# 1st step: NPT
|
| 35 |
+
timestep 0.1
|
| 36 |
+
fix NPTi all npt temp 1000 1000 $(100.0*dt) iso 1.0 1.0 $(1000.0*dt)
|
| 37 |
+
run 20000
|
| 38 |
+
unfix NPTi
|
| 39 |
+
|
| 40 |
+
# 2nd step: NPT, T decreasing
|
| 41 |
+
timestep 1.0
|
| 42 |
+
fix SHAKE2 all shake 1e-4 1000 0 m 1.0
|
| 43 |
+
fix NPTs all npt temp 1000 300 $(100.0*dt) iso 1.0 1.0 $(1000.0*dt)
|
| 44 |
+
run 5000000
|
| 45 |
+
unfix NPTs
|
| 46 |
+
|
| 47 |
+
#undump 2
|
| 48 |
+
reset_timestep 0
|
| 49 |
+
|
| 50 |
+
#dump 3 all xtc 1000 ${name}_lmp_eq2.xtc
|
| 51 |
+
#dump_modify 3 unwrap yes
|
| 52 |
+
#dump 4 all custom 1000 ${name}_lmp_eq2.dump id type mol x y z vx vy vz # Output coordinates and velocity
|
| 53 |
+
|
| 54 |
+
# calculate rg
|
| 55 |
+
compute c2 all chunk/atom molecule nchunk once limit 0 ids once compress no
|
| 56 |
+
compute c3 all gyration/chunk c2
|
| 57 |
+
fix rg all ave/time 1 10000 10000 c_c3 file ${name}_Rg.data mode vector
|
| 58 |
+
variable dens equal density
|
| 59 |
+
fix densprint all print 1000 "${dens}" file ${name}_density.dat screen no
|
| 60 |
+
|
| 61 |
+
# 3rd step: NPT
|
| 62 |
+
fix NPTf all npt temp 300 300 $(100.0*dt) iso 1.0 1.0 $(1000.0*dt)
|
| 63 |
+
run 8000000
|
| 64 |
+
unfix NPTf
|
| 65 |
+
unfix rg
|
| 66 |
+
unfix densprint
|
| 67 |
+
|
| 68 |
+
write_data ${name}_eq2.data
|
| 69 |
+
clear
|
data/ADEPT/2.Simulations/lammps_visc.in
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
###############################################################################
|
| 2 |
+
# Polymer Diffusion (MSD) + Green–Kubo Viscosity
|
| 3 |
+
# Tfinal is driven by Tg: Tfinal = Tg + 50 (pass Tg via: lmp -var Tg 250 ...)
|
| 4 |
+
###############################################################################
|
| 5 |
+
|
| 6 |
+
# ----------------------- Setup -----------------------
|
| 7 |
+
units real
|
| 8 |
+
dimension 3
|
| 9 |
+
boundary p p p
|
| 10 |
+
atom_style full
|
| 11 |
+
|
| 12 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 13 |
+
bond_style harmonic
|
| 14 |
+
angle_style harmonic
|
| 15 |
+
dihedral_style fourier
|
| 16 |
+
improper_style cvff
|
| 17 |
+
special_bonds amber
|
| 18 |
+
pair_modify mix arithmetic
|
| 19 |
+
kspace_style pppm 1e-6
|
| 20 |
+
|
| 21 |
+
# ----------------------- Data ------------------------
|
| 22 |
+
read_data ../../OPTIMIZATION/${name}/${name}_eq2.data
|
| 23 |
+
|
| 24 |
+
# ------------------- Temperature ---------------------
|
| 25 |
+
# Provide Tg at the command line: -var Tg 250
|
| 26 |
+
variable Tfinal equal v_Tg+50.0 # K
|
| 27 |
+
|
| 28 |
+
# ------------------- Timing / GK ---------------------
|
| 29 |
+
variable dt equal 1.0 # fs
|
| 30 |
+
timestep ${dt}
|
| 31 |
+
variable p equal 2000 # correlation length
|
| 32 |
+
variable s equal 10 # sample interval
|
| 33 |
+
variable d equal ${p}*${s} # thermo/ACF interval
|
| 34 |
+
|
| 35 |
+
# ----------------- Conversions -----------------------
|
| 36 |
+
variable kB equal 1.380649e-23
|
| 37 |
+
variable atm2Pa equal 101325.0
|
| 38 |
+
variable A2m equal 1.0e-10
|
| 39 |
+
variable fs2s equal 1.0e-15
|
| 40 |
+
variable convert equal ${atm2Pa}*${atm2Pa}*${fs2s}*${A2m}*${A2m}*${A2m} # GK
|
| 41 |
+
# MSD unit helper: Å^2/fs -> cm^2/s factor is 0.1
|
| 42 |
+
# (1 Å = 1e-8 cm, 1 fs = 1e-15 s) => Å^2/fs * 1e-16 / 1e-15 = 0.1
|
| 43 |
+
|
| 44 |
+
# ------------------- Thermo vars ---------------------
|
| 45 |
+
variable volume equal vol
|
| 46 |
+
variable ndens equal count(all)/vol # atoms/Å^3
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
fix NPTf all npt temp ${Tfinal} ${Tfinal} 100 iso 1.0 1.0 1000
|
| 50 |
+
run 1000000
|
| 51 |
+
unfix NPTf
|
| 52 |
+
reset_timestep 0
|
| 53 |
+
|
| 54 |
+
# ------------------- Groups / Fix --------------------
|
| 55 |
+
fix NVT all nvt temp ${Tfinal} ${Tfinal} 100.0
|
| 56 |
+
|
| 57 |
+
###############################################################################
|
| 58 |
+
# Diffusion of polymer (MSD of all polymer atoms)
|
| 59 |
+
###############################################################################
|
| 60 |
+
compute MSD_poly all msd # c_MSD_poly[4] = total MSD (Å^2)
|
| 61 |
+
|
| 62 |
+
# Two-point instantaneous D(t) = MSD(t)/(6t); convert to cm^2/s (0.1 factor)
|
| 63 |
+
variable D_two equal c_MSD_poly[4]/(6.0*(step*${dt}+1.0e-6))*0.1
|
| 64 |
+
|
| 65 |
+
# Slope/Einstein method: store MSD every 10 steps and take slope
|
| 66 |
+
fix VEC_POLY all vector 10 c_MSD_poly[4]
|
| 67 |
+
variable D_slope equal slope(f_VEC_POLY)/(6.0*(10.0*${dt}))*0.1
|
| 68 |
+
|
| 69 |
+
# Optional diagnostics: write MSD and D time series
|
| 70 |
+
fix MSD_OUT all ave/time 100 1 1000 c_MSD_poly[*] file ${name}_msd_poly.dat
|
| 71 |
+
fix D_OUT all ave/time 10 100000 1000000 v_D_two v_D_slope file ${name}_diff_poly_series.dat
|
| 72 |
+
|
| 73 |
+
###############################################################################
|
| 74 |
+
# Green–Kubo viscosity
|
| 75 |
+
###############################################################################
|
| 76 |
+
variable pxy equal pxy
|
| 77 |
+
variable pxz equal pxz
|
| 78 |
+
variable pyz equal pyz
|
| 79 |
+
|
| 80 |
+
fix SS all ave/correlate ${s} ${p} ${d} v_pxy v_pxz v_pyz type auto file ${name}_GK.dat ave running
|
| 81 |
+
|
| 82 |
+
variable scale equal ${convert}/(${kB}*${Tfinal})*${volume}*${s}*${dt}
|
| 83 |
+
variable v11 equal trap(f_SS[3])*${scale}
|
| 84 |
+
variable v22 equal trap(f_SS[4])*${scale}
|
| 85 |
+
variable v33 equal trap(f_SS[5])*${scale}
|
| 86 |
+
|
| 87 |
+
# ------------------- Thermo print --------------------
|
| 88 |
+
thermo ${d}
|
| 89 |
+
thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33 v_D_slope
|
| 90 |
+
|
| 91 |
+
###############################################################################
|
| 92 |
+
# Run
|
| 93 |
+
###############################################################################
|
| 94 |
+
run 5000000 # 5 ns at dt = 1 fs
|
| 95 |
+
###############################################################################
|
| 96 |
+
# Final values & file outputs
|
| 97 |
+
###############################################################################
|
| 98 |
+
# Final viscosity (Pa·s): average of the three components
|
| 99 |
+
variable viscosity equal (v_v11+v_v22+v_v33)/3.0
|
| 100 |
+
|
| 101 |
+
# Final diffusion coefficients (cm^2/s)
|
| 102 |
+
# D_slope is preferred; also record the last two-point estimate for reference.
|
| 103 |
+
variable D_final_slope equal v_D_slope
|
| 104 |
+
variable D_final_two equal v_D_two
|
| 105 |
+
|
| 106 |
+
# --------- Save to separate files (append one line per run) ----------
|
| 107 |
+
|
| 108 |
+
print " ${Tfinal} ${D_final_slope} " file ${name}_diffusion_result.dat
|
| 109 |
+
|
| 110 |
+
print "${Tfinal} ${viscosity}" file ${name}_viscosity_result.dat
|
| 111 |
+
# ----------------------- Cleanup ---------------------
|
| 112 |
+
unfix NVT
|
| 113 |
+
unfix SS
|
| 114 |
+
unfix VEC_POLY
|
| 115 |
+
unfix MSD_OUT
|
| 116 |
+
unfix D_OUT
|
data/ADEPT/2.Simulations/modulus_files/displace.mod
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NOTE: This script should not need to be
|
| 2 |
+
# modified. See in.elastic for more info.
|
| 3 |
+
#
|
| 4 |
+
# Find which reference length to use
|
| 5 |
+
|
| 6 |
+
if "${dir} == 1" then &
|
| 7 |
+
"variable len0 equal ${lx0}"
|
| 8 |
+
if "${dir} == 2" then &
|
| 9 |
+
"variable len0 equal ${ly0}"
|
| 10 |
+
if "${dir} == 3" then &
|
| 11 |
+
"variable len0 equal ${lz0}"
|
| 12 |
+
if "${dir} == 4" then &
|
| 13 |
+
"variable len0 equal ${lz0}"
|
| 14 |
+
if "${dir} == 5" then &
|
| 15 |
+
"variable len0 equal ${lz0}"
|
| 16 |
+
if "${dir} == 6" then &
|
| 17 |
+
"variable len0 equal ${ly0}"
|
| 18 |
+
|
| 19 |
+
# Reset box and simulation parameters
|
| 20 |
+
|
| 21 |
+
clear
|
| 22 |
+
box tilt large
|
| 23 |
+
read_restart restart.equil
|
| 24 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 25 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 26 |
+
reset_timestep 0
|
| 27 |
+
|
| 28 |
+
kspace_style pppm 1.0e-4
|
| 29 |
+
neighbor 2.5 bin
|
| 30 |
+
neigh_modify delay 0 every 25 check no
|
| 31 |
+
|
| 32 |
+
# Setup output
|
| 33 |
+
|
| 34 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 35 |
+
thermo ${nthermo}
|
| 36 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 37 |
+
thermo_modify norm no
|
| 38 |
+
|
| 39 |
+
# Setup MD
|
| 40 |
+
|
| 41 |
+
timestep ${timestep}
|
| 42 |
+
fix 4 all nve
|
| 43 |
+
if "${thermostat} == 1" then &
|
| 44 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 45 |
+
|
| 46 |
+
# Negative deformation
|
| 47 |
+
|
| 48 |
+
variable delta equal -${up}*${len0}
|
| 49 |
+
variable deltaxy equal -${up}*xy
|
| 50 |
+
variable deltaxz equal -${up}*xz
|
| 51 |
+
variable deltayz equal -${up}*yz
|
| 52 |
+
if "${dir} == 1" then &
|
| 53 |
+
"change_box all x delta 0 ${delta} xy delta ${deltaxy} xz delta ${deltaxz} remap units box"
|
| 54 |
+
if "${dir} == 2" then &
|
| 55 |
+
"change_box all y delta 0 ${delta} yz delta ${deltayz} remap units box"
|
| 56 |
+
if "${dir} == 3" then &
|
| 57 |
+
"change_box all z delta 0 ${delta} remap units box"
|
| 58 |
+
if "${dir} == 4" then &
|
| 59 |
+
"change_box all yz delta ${delta} remap units box"
|
| 60 |
+
if "${dir} == 5" then &
|
| 61 |
+
"change_box all xz delta ${delta} remap units box"
|
| 62 |
+
if "${dir} == 6" then &
|
| 63 |
+
"change_box all xy delta ${delta} remap units box"
|
| 64 |
+
|
| 65 |
+
# Run MD
|
| 66 |
+
|
| 67 |
+
run ${nequil}
|
| 68 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 69 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 70 |
+
reset_timestep 0
|
| 71 |
+
|
| 72 |
+
kspace_style pppm 1.0e-4
|
| 73 |
+
neighbor 2.5 bin
|
| 74 |
+
neigh_modify delay 0 every 25 check no
|
| 75 |
+
|
| 76 |
+
# Setup output
|
| 77 |
+
|
| 78 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 79 |
+
thermo ${nthermo}
|
| 80 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 81 |
+
thermo_modify norm no
|
| 82 |
+
|
| 83 |
+
# Setup MD
|
| 84 |
+
|
| 85 |
+
timestep ${timestep}
|
| 86 |
+
fix 4 all nve
|
| 87 |
+
if "${thermostat} == 1" then &
|
| 88 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 89 |
+
run ${nrun}
|
| 90 |
+
|
| 91 |
+
# Obtain new stress tensor
|
| 92 |
+
|
| 93 |
+
variable pxx1 equal f_avp[1]
|
| 94 |
+
variable pyy1 equal f_avp[2]
|
| 95 |
+
variable pzz1 equal f_avp[3]
|
| 96 |
+
variable pxy1 equal f_avp[4]
|
| 97 |
+
variable pxz1 equal f_avp[5]
|
| 98 |
+
variable pyz1 equal f_avp[6]
|
| 99 |
+
|
| 100 |
+
# Compute elastic constant from pressure tensor
|
| 101 |
+
|
| 102 |
+
variable C1neg equal ${d1}
|
| 103 |
+
variable C2neg equal ${d2}
|
| 104 |
+
variable C3neg equal ${d3}
|
| 105 |
+
variable C4neg equal ${d4}
|
| 106 |
+
variable C5neg equal ${d5}
|
| 107 |
+
variable C6neg equal ${d6}
|
| 108 |
+
|
| 109 |
+
# Reset box and simulation parameters
|
| 110 |
+
|
| 111 |
+
clear
|
| 112 |
+
box tilt large
|
| 113 |
+
read_restart restart.equil
|
| 114 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 115 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 116 |
+
reset_timestep 0
|
| 117 |
+
|
| 118 |
+
kspace_style pppm 1.0e-4
|
| 119 |
+
neighbor 2.5 bin
|
| 120 |
+
neigh_modify delay 0 every 25 check no
|
| 121 |
+
|
| 122 |
+
# Setup output
|
| 123 |
+
|
| 124 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 125 |
+
thermo ${nthermo}
|
| 126 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 127 |
+
thermo_modify norm no
|
| 128 |
+
|
| 129 |
+
# Setup MD
|
| 130 |
+
|
| 131 |
+
timestep ${timestep}
|
| 132 |
+
fix 4 all nve
|
| 133 |
+
if "${thermostat} == 1" then &
|
| 134 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 135 |
+
|
| 136 |
+
# Positive deformation
|
| 137 |
+
|
| 138 |
+
variable delta equal ${up}*${len0}
|
| 139 |
+
variable deltaxy equal ${up}*xy
|
| 140 |
+
variable deltaxz equal ${up}*xz
|
| 141 |
+
variable deltayz equal ${up}*yz
|
| 142 |
+
if "${dir} == 1" then &
|
| 143 |
+
"change_box all x delta 0 ${delta} xy delta ${deltaxy} xz delta ${deltaxz} remap units box"
|
| 144 |
+
if "${dir} == 2" then &
|
| 145 |
+
"change_box all y delta 0 ${delta} yz delta ${deltayz} remap units box"
|
| 146 |
+
if "${dir} == 3" then &
|
| 147 |
+
"change_box all z delta 0 ${delta} remap units box"
|
| 148 |
+
if "${dir} == 4" then &
|
| 149 |
+
"change_box all yz delta ${delta} remap units box"
|
| 150 |
+
if "${dir} == 5" then &
|
| 151 |
+
"change_box all xz delta ${delta} remap units box"
|
| 152 |
+
if "${dir} == 6" then &
|
| 153 |
+
"change_box all xy delta ${delta} remap units box"
|
| 154 |
+
|
| 155 |
+
# Run MD
|
| 156 |
+
|
| 157 |
+
run ${nequil}
|
| 158 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 159 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 160 |
+
reset_timestep 0
|
| 161 |
+
|
| 162 |
+
kspace_style pppm 1.0e-4
|
| 163 |
+
neighbor 2.5 bin
|
| 164 |
+
neigh_modify delay 0 every 25 check no
|
| 165 |
+
|
| 166 |
+
# Setup output
|
| 167 |
+
|
| 168 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 169 |
+
thermo ${nthermo}
|
| 170 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 171 |
+
thermo_modify norm no
|
| 172 |
+
|
| 173 |
+
# Setup MD
|
| 174 |
+
|
| 175 |
+
timestep ${timestep}
|
| 176 |
+
fix 4 all nve
|
| 177 |
+
if "${thermostat} == 1" then &
|
| 178 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 179 |
+
run ${nrun}
|
| 180 |
+
|
| 181 |
+
# Obtain new stress tensor
|
| 182 |
+
|
| 183 |
+
variable pxx1 equal f_avp[1]
|
| 184 |
+
variable pyy1 equal f_avp[2]
|
| 185 |
+
variable pzz1 equal f_avp[3]
|
| 186 |
+
variable pxy1 equal f_avp[4]
|
| 187 |
+
variable pxz1 equal f_avp[5]
|
| 188 |
+
variable pyz1 equal f_avp[6]
|
| 189 |
+
|
| 190 |
+
# Compute elastic constant from pressure tensor
|
| 191 |
+
|
| 192 |
+
variable C1pos equal ${d1}
|
| 193 |
+
variable C2pos equal ${d2}
|
| 194 |
+
variable C3pos equal ${d3}
|
| 195 |
+
variable C4pos equal ${d4}
|
| 196 |
+
variable C5pos equal ${d5}
|
| 197 |
+
variable C6pos equal ${d6}
|
| 198 |
+
|
| 199 |
+
# Combine positive and negative
|
| 200 |
+
|
| 201 |
+
variable C1${dir} equal 0.5*(${C1neg}+${C1pos})
|
| 202 |
+
variable C2${dir} equal 0.5*(${C2neg}+${C2pos})
|
| 203 |
+
variable C3${dir} equal 0.5*(${C3neg}+${C3pos})
|
| 204 |
+
variable C4${dir} equal 0.5*(${C4neg}+${C4pos})
|
| 205 |
+
variable C5${dir} equal 0.5*(${C5neg}+${C5pos})
|
| 206 |
+
variable C6${dir} equal 0.5*(${C6neg}+${C6pos})
|
| 207 |
+
|
| 208 |
+
# Delete dir to make sure it is not reused
|
| 209 |
+
|
| 210 |
+
variable dir delete
|
data/ADEPT/2.Simulations/modulus_files/in.elastic
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
log log.elastic_T
|
| 2 |
+
####################################
|
| 3 |
+
# 1st stage equilibration
|
| 4 |
+
####################################
|
| 5 |
+
units real
|
| 6 |
+
atom_style full
|
| 7 |
+
boundary p p p
|
| 8 |
+
|
| 9 |
+
bond_style harmonic
|
| 10 |
+
angle_style harmonic
|
| 11 |
+
dihedral_style fourier
|
| 12 |
+
improper_style cvff
|
| 13 |
+
|
| 14 |
+
pair_style lj/cut/coul/long 8.0 12.0
|
| 15 |
+
pair_modify mix arithmetic
|
| 16 |
+
special_bonds amber
|
| 17 |
+
neighbor 3.0 bin
|
| 18 |
+
neigh_modify delay 0 every 1
|
| 19 |
+
kspace_style pppm 1e-6
|
| 20 |
+
|
| 21 |
+
read_data eq2.data
|
| 22 |
+
|
| 23 |
+
# NPT
|
| 24 |
+
fix NPT all npt temp 300 300 100 iso 1.0 1.0 1000
|
| 25 |
+
run 8000000 every 80000 "write_data eq2_*.data"
|
| 26 |
+
unfix NPT
|
| 27 |
+
clear
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
####################################
|
| 31 |
+
# 2nd Modulus Calculation
|
| 32 |
+
####################################
|
| 33 |
+
include in_1.elastic
|
| 34 |
+
include in_2.elastic
|
| 35 |
+
include in_3.elastic
|
| 36 |
+
include in_4.elastic
|
| 37 |
+
include in_5.elastic
|
| 38 |
+
include in_6.elastic
|
| 39 |
+
include in_7.elastic
|
| 40 |
+
include in_8.elastic
|
| 41 |
+
include in_9.elastic
|
| 42 |
+
include in_10.elastic
|
| 43 |
+
include in_11.elastic
|
| 44 |
+
include in_12.elastic
|
| 45 |
+
include in_13.elastic
|
| 46 |
+
include in_14.elastic
|
| 47 |
+
include in_15.elastic
|
| 48 |
+
include in_16.elastic
|
| 49 |
+
include in_17.elastic
|
| 50 |
+
include in_18.elastic
|
| 51 |
+
include in_19.elastic
|
| 52 |
+
include in_20.elastic
|
| 53 |
+
include in_21.elastic
|
| 54 |
+
include in_22.elastic
|
| 55 |
+
include in_23.elastic
|
| 56 |
+
include in_24.elastic
|
| 57 |
+
include in_25.elastic
|
| 58 |
+
include in_26.elastic
|
| 59 |
+
include in_27.elastic
|
| 60 |
+
include in_28.elastic
|
| 61 |
+
include in_29.elastic
|
| 62 |
+
include in_30.elastic
|
| 63 |
+
include in_31.elastic
|
| 64 |
+
include in_32.elastic
|
| 65 |
+
include in_33.elastic
|
| 66 |
+
include in_34.elastic
|
| 67 |
+
include in_35.elastic
|
| 68 |
+
include in_36.elastic
|
| 69 |
+
include in_37.elastic
|
| 70 |
+
include in_38.elastic
|
| 71 |
+
include in_39.elastic
|
| 72 |
+
include in_40.elastic
|
| 73 |
+
include in_41.elastic
|
| 74 |
+
include in_42.elastic
|
| 75 |
+
include in_43.elastic
|
| 76 |
+
include in_44.elastic
|
| 77 |
+
include in_45.elastic
|
| 78 |
+
include in_46.elastic
|
| 79 |
+
include in_47.elastic
|
| 80 |
+
include in_48.elastic
|
| 81 |
+
include in_49.elastic
|
| 82 |
+
include in_50.elastic
|
| 83 |
+
include in_51.elastic
|
| 84 |
+
include in_52.elastic
|
| 85 |
+
include in_53.elastic
|
| 86 |
+
include in_54.elastic
|
| 87 |
+
include in_55.elastic
|
| 88 |
+
include in_56.elastic
|
| 89 |
+
include in_57.elastic
|
| 90 |
+
include in_58.elastic
|
| 91 |
+
include in_59.elastic
|
| 92 |
+
include in_60.elastic
|
| 93 |
+
include in_61.elastic
|
| 94 |
+
include in_62.elastic
|
| 95 |
+
include in_63.elastic
|
| 96 |
+
include in_64.elastic
|
| 97 |
+
include in_65.elastic
|
| 98 |
+
include in_66.elastic
|
| 99 |
+
include in_67.elastic
|
| 100 |
+
include in_68.elastic
|
| 101 |
+
include in_69.elastic
|
| 102 |
+
include in_70.elastic
|
| 103 |
+
include in_71.elastic
|
| 104 |
+
include in_72.elastic
|
| 105 |
+
include in_73.elastic
|
| 106 |
+
include in_74.elastic
|
| 107 |
+
include in_75.elastic
|
| 108 |
+
include in_76.elastic
|
| 109 |
+
include in_77.elastic
|
| 110 |
+
include in_78.elastic
|
| 111 |
+
include in_79.elastic
|
| 112 |
+
include in_80.elastic
|
| 113 |
+
include in_81.elastic
|
| 114 |
+
include in_82.elastic
|
| 115 |
+
include in_83.elastic
|
| 116 |
+
include in_84.elastic
|
| 117 |
+
include in_85.elastic
|
| 118 |
+
include in_86.elastic
|
| 119 |
+
include in_87.elastic
|
| 120 |
+
include in_88.elastic
|
| 121 |
+
include in_89.elastic
|
| 122 |
+
include in_90.elastic
|
| 123 |
+
include in_91.elastic
|
| 124 |
+
include in_92.elastic
|
| 125 |
+
include in_93.elastic
|
| 126 |
+
include in_94.elastic
|
| 127 |
+
include in_95.elastic
|
| 128 |
+
include in_96.elastic
|
| 129 |
+
include in_97.elastic
|
| 130 |
+
include in_98.elastic
|
| 131 |
+
include in_99.elastic
|
| 132 |
+
include in_100.elastic
|
data/ADEPT/2.Simulations/modulus_files/in_1.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_80000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_10.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_800000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_100.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_8000000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_11.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_880000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_12.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_960000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_13.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1040000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_14.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1120000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_15.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1200000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_16.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1280000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_17.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1360000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_18.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1440000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_19.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1520000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_2.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_160000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_20.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1600000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_21.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1680000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_22.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1760000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_23.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1840000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_24.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_1920000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_25.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2000000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_26.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2080000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_27.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2160000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_28.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2240000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_29.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2320000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_3.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_240000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_30.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2400000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_31.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2480000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_32.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2560000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_33.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2640000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_34.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2720000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_35.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2800000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_36.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2880000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_37.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_2960000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|
data/ADEPT/2.Simulations/modulus_files/in_38.elastic
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Define the finite deformation size. Try several values of this
|
| 2 |
+
# variable to verify that results do not depend on it.
|
| 3 |
+
variable up equal 2.0e-2
|
| 4 |
+
|
| 5 |
+
# real units, elastic constants in GPa
|
| 6 |
+
units real
|
| 7 |
+
variable cfac equal 1.01325e-4
|
| 8 |
+
variable cunits string GPa
|
| 9 |
+
|
| 10 |
+
# Define MD parameters
|
| 11 |
+
variable nevery equal 10 # sampling interval
|
| 12 |
+
variable nrepeat equal 10 # number of samples
|
| 13 |
+
variable nfreq equal ${nevery}*${nrepeat} # length of one average
|
| 14 |
+
variable nthermo equal ${nfreq} # interval for thermo output
|
| 15 |
+
variable nequil equal 10*${nthermo} # length of equilibration run
|
| 16 |
+
variable nrun equal 3*${nthermo} # length of equilibrated run
|
| 17 |
+
variable temp equal 300.0 # temperature of initial sample
|
| 18 |
+
variable timestep equal 0.25 # timestep (femtoseconds)
|
| 19 |
+
variable adiabatic equal 0 # adiabatic (1) or isothermal (2)
|
| 20 |
+
variable tdamp equal 100 # time constant for thermostat
|
| 21 |
+
variable seed equal 123457 # seed for thermostat
|
| 22 |
+
|
| 23 |
+
units real
|
| 24 |
+
dimension 3
|
| 25 |
+
boundary p p p
|
| 26 |
+
atom_style full
|
| 27 |
+
pair_style lj/cut/coul/long 12.0 12.0
|
| 28 |
+
pair_modify mix arithmetic
|
| 29 |
+
bond_style harmonic
|
| 30 |
+
angle_style harmonic
|
| 31 |
+
dihedral_style fourier
|
| 32 |
+
improper_style cvff
|
| 33 |
+
special_bonds amber
|
| 34 |
+
kspace_style pppm 1e-4
|
| 35 |
+
|
| 36 |
+
read_data eq2_3040000.data
|
| 37 |
+
change_box all triclinic
|
| 38 |
+
velocity all create ${temp} 87287
|
| 39 |
+
|
| 40 |
+
# Compute initial state
|
| 41 |
+
|
| 42 |
+
variable thermostat equal 1
|
| 43 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 44 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 45 |
+
reset_timestep 0
|
| 46 |
+
|
| 47 |
+
kspace_style pppm 1.0e-4
|
| 48 |
+
neighbor 2.5 bin
|
| 49 |
+
neigh_modify delay 0 every 25 check no
|
| 50 |
+
|
| 51 |
+
# Setup output
|
| 52 |
+
|
| 53 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 54 |
+
thermo ${nthermo}
|
| 55 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 56 |
+
thermo_modify norm no
|
| 57 |
+
|
| 58 |
+
# Setup MD
|
| 59 |
+
|
| 60 |
+
timestep ${timestep}
|
| 61 |
+
fix 4 all nve
|
| 62 |
+
if "${thermostat} == 1" then &
|
| 63 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 64 |
+
run ${nequil}
|
| 65 |
+
|
| 66 |
+
if "${adiabatic} == 1" &
|
| 67 |
+
then "variable thermostat equal 0" &
|
| 68 |
+
else "variable thermostat equal 1"
|
| 69 |
+
|
| 70 |
+
print ${thermostat}
|
| 71 |
+
|
| 72 |
+
# we must undefine any fix ave/* fix before using reset_timestep
|
| 73 |
+
if "$(is_defined(fix,avp))" then "unfix avp"
|
| 74 |
+
reset_timestep 0
|
| 75 |
+
|
| 76 |
+
kspace_style pppm 1.0e-4
|
| 77 |
+
neighbor 2.5 bin
|
| 78 |
+
neigh_modify delay 0 every 25 check no
|
| 79 |
+
|
| 80 |
+
# Setup output
|
| 81 |
+
|
| 82 |
+
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} c_thermo_press mode vector
|
| 83 |
+
thermo ${nthermo}
|
| 84 |
+
thermo_style custom step temp pe press f_avp[1] f_avp[2] f_avp[3] f_avp[4] f_avp[5] f_avp[6]
|
| 85 |
+
thermo_modify norm no
|
| 86 |
+
|
| 87 |
+
# Setup MD
|
| 88 |
+
|
| 89 |
+
timestep ${timestep}
|
| 90 |
+
fix 4 all nve
|
| 91 |
+
if "${thermostat} == 1" then &
|
| 92 |
+
"fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
|
| 93 |
+
run ${nrun}
|
| 94 |
+
|
| 95 |
+
variable pxx0 equal f_avp[1]
|
| 96 |
+
variable pyy0 equal f_avp[2]
|
| 97 |
+
variable pzz0 equal f_avp[3]
|
| 98 |
+
variable pxy0 equal f_avp[4]
|
| 99 |
+
variable pxz0 equal f_avp[5]
|
| 100 |
+
variable pyz0 equal f_avp[6]
|
| 101 |
+
|
| 102 |
+
variable tmp equal lx
|
| 103 |
+
variable lx0 equal ${tmp}
|
| 104 |
+
variable tmp equal ly
|
| 105 |
+
variable ly0 equal ${tmp}
|
| 106 |
+
variable tmp equal lz
|
| 107 |
+
variable lz0 equal ${tmp}
|
| 108 |
+
|
| 109 |
+
# These formulas define the derivatives w.r.t. strain components
|
| 110 |
+
# Constants uses $, variables use v_
|
| 111 |
+
variable d1 equal -(v_pxx1-${pxx0})/(v_delta/v_len0)*${cfac}
|
| 112 |
+
variable d2 equal -(v_pyy1-${pyy0})/(v_delta/v_len0)*${cfac}
|
| 113 |
+
variable d3 equal -(v_pzz1-${pzz0})/(v_delta/v_len0)*${cfac}
|
| 114 |
+
variable d4 equal -(v_pyz1-${pyz0})/(v_delta/v_len0)*${cfac}
|
| 115 |
+
variable d5 equal -(v_pxz1-${pxz0})/(v_delta/v_len0)*${cfac}
|
| 116 |
+
variable d6 equal -(v_pxy1-${pxy0})/(v_delta/v_len0)*${cfac}
|
| 117 |
+
|
| 118 |
+
# Write restart
|
| 119 |
+
write_restart restart.equil
|
| 120 |
+
|
| 121 |
+
# uxx Perturbation
|
| 122 |
+
|
| 123 |
+
variable dir equal 1
|
| 124 |
+
include displace.mod
|
| 125 |
+
|
| 126 |
+
# uyy Perturbation
|
| 127 |
+
|
| 128 |
+
variable dir equal 2
|
| 129 |
+
include displace.mod
|
| 130 |
+
|
| 131 |
+
# uzz Perturbation
|
| 132 |
+
|
| 133 |
+
variable dir equal 3
|
| 134 |
+
include displace.mod
|
| 135 |
+
|
| 136 |
+
# uyz Perturbation
|
| 137 |
+
|
| 138 |
+
variable dir equal 4
|
| 139 |
+
include displace.mod
|
| 140 |
+
|
| 141 |
+
# uxz Perturbation
|
| 142 |
+
|
| 143 |
+
variable dir equal 5
|
| 144 |
+
include displace.mod
|
| 145 |
+
|
| 146 |
+
# uxy Perturbation
|
| 147 |
+
|
| 148 |
+
variable dir equal 6
|
| 149 |
+
include displace.mod
|
| 150 |
+
|
| 151 |
+
# Output final values
|
| 152 |
+
|
| 153 |
+
include post_vrh.mod
|
| 154 |
+
clear
|