Comments (1)
from atomate2.vasp.flows.hiphive import HiphiveMaker
from atomate2.forcefields.flows.hiphive import HiphiveMaker as HiphiveMakerFF
from atomate2.forcefields.jobs import (
CHGNetRelaxMaker, CHGNetStaticMaker, M3GNetRelaxMaker, M3GNetStaticMaker, MACERelaxMaker, MACEStaticMaker
)
from jobflow import run_locally
import numpy as np
from fireworks import LaunchPad
from jobflow.managers.fireworks import flow_to_workflow
from mp_api.client import MPRester
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
with MPRester("...") as mpr:
mpids = ["mp-1265"] # MgO
for i, mpid in enumerate(mpids):
fields = ["material_id", "band_gap", "bulk_modulus", "formula_pretty", "nsites", "structure"]
data = mpr.materials.summary.search(material_ids=[mpid], fields=fields)
example_doc = data[0]
struct = example_doc.structure
struct = SpacegroupAnalyzer(struct).find_primitive()
mpid_new = example_doc.material_id
k_vrh = example_doc.bulk_modulus['vrh']
nsites = example_doc.nsites
try:
bulk_mod = k_vrh
print(f'bulk_mod = {bulk_mod}')
except:
pass
sa = SpacegroupAnalyzer(struct)
sym_operations: list = sa.get_point_group_operations()
num_operations = len(sym_operations)
print(f"number of point group operations: {num_operations}")
crystal_system = sa.get_crystal_system()
print(f"crystal system: {crystal_system}")
if crystal_system == "cubic":
n_configs_per_std = int(nsites/2)
else:
n_configs_per_std = int(nsites/2*np.sqrt(48)/num_operations)
print(f"n_configs_per_std: {n_configs_per_std}")
factor = np.around(np.mean(struct.atomic_numbers)/40,1) # displacement scaler factor - TO BE ADJUSTED
fixed_displs = [0.01,0.03,0.08,0.1] # new displacement values
perturbed_structure_kwargs={"rattle_stds": fixed_displs,"n_configs_per_std":n_configs_per_std},
calculate_lattice_thermal_conductivity=True,
fit_method = ["rfe"]
disp_cut = 0.05
min_atoms=150 #150 #4
max_atoms=60 #600 #10
min_length=18 #18 #6
supercell_matrix_kwargs={"min_atoms":min_atoms, "max_atoms":max_atoms, "force_diagonal":True}
hiphive_flow = HiphiveMakerFF(
supercell_matrix_kwargs=supercell_matrix_kwargs,
min_length=min_length,
THERM_COND_SOLVER="shengbte", # almabte
).make(
mpid=mpid,
structure=struct,
bulk_modulus=bulk_mod,
renormalize=False,
n_structures=n_configs_per_std,
fixed_displs=fixed_displs,
disp_cut=disp_cut)
# # run the job locally
# run_locally(hiphive_flow, create_folders=True)
# convert the flow to a fireworks WorkFlow object and submit the job to the LaunchPad
wf = flow_to_workflow(hiphive_flow)
lpad = LaunchPad.from_file('/Users/HPSahasrabuddhe/fw_config_perlmutter/my_launchpad.yaml')
lpad.add_wf(wf)
from atomate2.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomate2.