Iâve gotten the same error message as well:
Error: core/format.c:363 FormatOpen:
Error opening file âbuild.emcâ.
Program aborted.
My code worked perfectly with the previous version, which expired yesterday, but it broke with the new version. For your reference, here is my example.esh and build.emc files(I use emc-pypi to run it):
example.esh:
#!/usr/bin/env emc.pl
ITEM OPTIONS
replace true
field pcff
location field
density 0.05
ntotal 1200
ITEM END
# Groups
ITEM GROUPS
DP *c1ccc(cc1)c1ccc*(cc1),1,DP:2
methyl *C,1,DP:1,1,DP:2
ITEM END
# Clusters
ITEM CLUSTERS
poly alternate 1
ITEM END
# Polymers
ITEM POLYMERS
poly
30 DP,10,methyl,2
ITEM END
build.emc:
(* EMC: Script *)
(* Created by C:\Users\jihoon\Desktop\softwares\emc-pypi\venv\Lib\site-packages\pyemc\emc\scripts\emc.pl v5.1, July 11, 2024
on Fri Aug 01 18:07:21 KST 202 *)
(* define variables *)
variables = {
seed -> -1,
ntotal -> 1200,
fshape -> 1,
output -> "example",
field -> "pcff/pcff",
location -> "C:/Users/jihoon/Desktop/softwares/emc_win32_v9.4.4_20250801/v9.4.4/field/",
nav -> 0.6022141179,
temperature -> 300,
radius -> 5,
nrelax -> 100,
weight_nonbond -> 0.0001,
weight_bond -> 0.0001,
weight_focus -> 1,
cutoff -> 9.5,
charge_cutoff -> 9.5,
kappa -> 4,
density1 -> 0.05,
lprevious -> 0,
lphase -> 0,
f_poly -> 1,
chem_DP -> "*c1ccc(cc1)c1ccc*(cc1)",
chem_methyl -> "*C"
};
output = {
debug -> false,
exit -> true,
info -> true,
warning -> true
};
(* define force field *)
field = {
id -> pcff,
mode -> cff,
name -> {location+field+".frc", location+field+"_templates.dat"},
compress -> false
};
(* define regular groups *)
groups = {
group -> {
id -> DP, depth -> 8, chemistry -> chem_DP,
connects -> {
{source -> $end1, destination -> {DP, $end2}},
{source -> $end1, destination -> {methyl, $end1}},
{source -> $end2, destination -> {DP, $end1}},
{source -> $end2, destination -> {methyl, $end1}}
}
},
group -> {
id -> methyl, depth -> 8, chemistry -> chem_methyl,
connects -> {
{source -> $end1, destination -> {DP, $end1}},
{source -> $end1, destination -> {DP, $end2}}
}
}
};
field = {
mode -> apply,
check -> {
atomistic -> true,
charge -> true
},
debug -> false
};
(* determine simulation sizing *)
variables = {
(* lengths *)
lg_DP -> nsites(DP),
lg_methyl -> nsites(methyl),
l_poly -> 10*lg_DP+6*lg_TP+2*lg_methyl,
(* masses *)
mg_DP -> mass(DP),
mg_methyl -> mass(methyl),
m_poly -> 10*mg_DP+6*mg_TP+2*mg_methyl,
(* mol fractions *)
f_poly -> f_poly*l_poly,
(* normalization *)
norm -> f_poly,
f_poly -> f_poly/norm,
(* sizing *)
n_poly -> int(f_poly*ntotal/l_poly+0.5),
(* system sizing *)
ntotal -> 0,
mtotal -> 0,
vtotal -> 0
};
field = {
mode -> apply,
check -> {
atomistic -> true,
charge -> true
},
debug -> false
};
(* define interactions *)
simulation = {
units -> {
permittivity -> 1,
seed -> seed
},
types -> {
coulomb -> {
pair -> {active -> true, cutoff -> charge_cutoff}
}
}
};
(* clusters phase 1 *)
clusters = {
progress -> none,
polymer -> {
id -> poly, system -> main, type -> alternate,
n -> n_poly,
groups -> {DP, TP, methyl},
weights -> {1, 1, 1},
nrepeat -> {10, 6, 2}
}
};
field = {
mode -> apply,
check -> {
atomistic -> true,
charge -> true
},
debug -> false
};
(* build phase 1 *)
variables = {
nphase1 -> ntotal()-ntotal,
mphase1 -> mtotal()-mtotal,
vphase1 -> mphase1/nav/density1,
lbox -> (vphase1/fshape)^(1/3),
lphase1 -> fshape*lbox,
lphase -> lphase1,
lxx -> lphase,
lyy -> lbox,
lzz -> lbox,
lzy -> 0,
lzx -> 0,
lyx -> 0,
ntotal -> nphase1,
mtotal -> mphase1,
vtotal -> vphase1
};
types = {
inverse -> {
cutoff -> 0.001
},
cff -> {
pair -> {active -> true, mode -> repulsive}
}
};
build = {
system -> {
id -> main,
split -> false,
geometry -> {xx -> lxx, yy -> lyy, zz -> lzz,
zy -> lzy, zx -> lzx, yx -> lyx},
temperature -> temperature,
flag -> {charge -> true, geometry -> true, map -> true, pbc -> true}
},
select -> {
progress -> list,
frequency -> 1,
name -> "error",
order -> random,
cluster -> {poly},
relax -> {ncycles -> nrelax, radius -> radius},
grow -> {
method -> energetic,
check -> all,
nbonded -> 20,
ntrials -> 20,
niterations -> 1000,
theta -> 0,
weight -> {
bonded -> weight_bond, nonbonded -> weight_nonbond,
focus -> weight_focus}
}
}
};
force = {style -> none, message -> nkt};
force = {style -> init, message -> nkt};
(* LAMMPS profile variables *)
variables = {
nl_poly -> nclusters(clusters -> poly)
};
(* storage *)
put = {name -> output, compress -> true};
lammps = {name -> output, mode -> put, forcefield -> cff,
parameters -> true, types -> false, unwrap -> true,
charges -> true, ewald -> true};
pdb = {name -> output, compress -> true, extend -> false,
forcefield -> cff, detect -> false, hexadecimal -> false,
unwrap -> true, pbc -> true, atom -> index, residue -> index,
segment -> index, rank -> false, vdw -> false, cut -> false,
fixed -> true, rigid -> true, connectivity -> false,
parameters -> false};