pair_style hybrid cannot define multi pair_coeff for each style?

Dear all,

I am using a pair_style hybrid command as follows,

pair_style hybrid lj/cut 1.12 table linear 1000

pair_modify shift yes
pair_coeff * * lj/cut 0 0.0 0.0
pair_coeff 1 1 li/cut 1 1.0 1.12 # excluded volume
pair_coeff 2 2 lj/cut 1 0.6 0.68
pair_coeff 3 3 lj/cut 1 0.6 0.68
pair_coeff 2 3 table ssDNA_attra.table ssDNA_attraction 3.0

However, it complains that ‘Pair coeff for hybrid has invalid style’. Then when I changed it to

pair_style hybrid lj/cut 1.12 table linear 1000

pair_modify shift yes
pair_coeff * * lj/cut 0 0.0 0.0
pair_coeff 2 3 table ssDNA_attra.table ssDNA_attraction 3.0

The programme would go without problems (though unphysical). I suspect that it is because the pair_coeff cannot be defined more than once for each pair-style in the pair_hybrid command - is that true?

If it is the case, how should I change to get the thing that I want?

Best,

Sunnia

Dear all,

I am using a pair_style hybrid command as follows,

  pair_style hybrid lj/cut 1.12 table linear 1000

  pair_modify shift yes
  pair_coeff * * lj/cut 0 0.0 0.0
  pair_coeff 1 1 li/cut 1 1.0 1.12 # excluded volume

​here is a typo: li/cut != lj/cut​

  pair_coeff 2 2 lj/cut 1 0.6 0.68

  pair_coeff 3 3 lj/cut 1 0.6 0.68
  pair_coeff 2 3 table ssDNA_attra.table ssDNA_attraction 3.0

However, it complains that 'Pair coeff for hybrid has invalid style'. Then
when I changed it to

  pair_style hybrid lj/cut 1.12 table linear 1000

  pair_modify shift yes
  pair_coeff * * lj/cut 0 0.0 0.0
  pair_coeff 2 3 table ssDNA_attra.table ssDNA_attraction 3.0

The programme would go without problems (though unphysical). I suspect
that it is because the pair_coeff cannot be defined more than once for each
pair-style in the pair_hybrid command - is that true?

​no.​

If it is the case, how should I change to get the thing that I want?

​check for and fix your typos

:wink:

axel.​