Field PCFF not found

Hi,

I’m new to EMC and trying to run a script from a previous post (Polymer with straight backbone - #4 by veld):

ITEM OPTIONS

replace true
field pcff
density 0.01
temperature 1
number true
focus true

ITEM END

ITEM GROUPS

ethyl CC, 1,ethyl:2
methyl *C, 1,ethyl:1, 1,ethyl:2

ITEM END

ITEM CLUSTERS

poly alternate, 1

ITEM END

ITEM POLYMERS

poly
100 ethyl, 10, methyl, 2

ITEM END

After I run ‘emc_setup.pl polymer’, it gives one warning:‘field ‘pcff’ not found; no changes’ and opls-ua is used. I am wondering how I can correctly apply the PCFF force field to build a polymer.

Thanks in advance for your help!

1 Like

Hi,

The easiest way to fix this problem is to set the environment variable EMC_ROOT. When you are using LINUX, you can set this variable by

export EMC_ROOT=/your/emc/version

You can make this your default by permanently adding the above to your ~/.bashrc. See ‘How to setup EMC for Windows’ for setting environment variables under Windows.

Thanks for the reply! Actually I have already set the environment variables according to the link you posted (please see screenshots below) before I tried running the script.


image

I had the same problem as you, and before problem I also set the environment variables. I guess this is probably a bug in windows that needs fixing.

In addition, I’ve tried many times and found that running emc_win32 build.emc always fails, even when I’m building just the water example.

@veld @yzheng98

Hi, I also am having this problem and set up the paths similarly. Im including a picture of the error and the paths ive set up. Has anyone figured out how to fix this?
Thanks!


Dear user,

Please note that the environment variable EMC_ROOT does not represent a path but a directory only. It should hold the root directory of EMC only, i.e. for a UNIX-type system using BASH or similar

export EMC_ROOT=$HOME/v9.4.4

where the predefined environment variable $HOME would equal to /Users/brandon in the above screen shots. After defining the above, other additions to your path variable could be added by

export PATH=$PATH:$EMC_ROOT/bin:$EMC_ROOT/scripts

I would suggest creating an EMC folder in your home directory, in which you can add current and future versions of EMC. Thus the above root directory would become

export EMC_ROOT=$HOME/emc/v9.4.4
1 Like

Hi, I created an emc folder and defined EMC_ROOT with the command echo …

grenx10:~/emc/v9.4.4/examples/setup/chemistry/polymer/homopolymer>> echo EMC_ROOT /home/pt170639/emc/v9.4.4

and I am always the problem with the Field PCFF

grenx10:~/emc/v9.4.4/examples/setup/chemistry/polymer/homopolymer>> emc_setup.pl polymer.esh
EMC Setup v4.1.5 (March 30, 2024), (c) 2004-2024 Pieter J. in 't Veld

Info: reading script from “./polymer.esh”
Info: phase1 = {poly}
Info: project = polymer
Info: ntotal = 1000
Info: direction = x
Info: shape = 1
Info: force field type = “opls”
Info: force field name = “opls/2012/opls-ua”
Info: force field location = “$/home/pt170639/emc/v9.4.4/field”
Info: build for LAMMPS script in “…/build”
Warning: field ‘pcff’ not found; no changes
Info: creating LAMMPS run script “polymer.in”
Info: adding pressure sampling
Info: creating EMC build script “build.emc”
Info: assuming mol fractions

have you an idea ?