Bug in Fragment Generation Script

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 9 months ago #193 by jdmoore
Hi,

I think there is a bug in the fragment generation code. Each of the atoms in each fragment have the same LJ parameters. This is true for fragments I generated but also in the Examples/GCMC. For example, see frag_2_1.mcf for Methane_Butane.

When I read in a configuration, I am getting matching energies compared to LAMMPS, but when generating a configuration for example with make_config or inserting with GCMC, I am getting what seems to be the incorrect VDW energies.

Does make_config, etc., when inserting molecules read the VDW energies from the *mcf files in the fragment directory? The bond lengths and angle coefficients and angles appear to be correctly transferred to the fragment *mcfs.

Thanks.

Josh

Please Log in to join the conversation.

More
7 years 9 months ago #198 by ryangmullen
Hi Josh,

That is a bug, but I don't think it effects anything. The vdw energies are typically ignored within fragments (which by definition only include 1-2 and 1-3 interactions). Ring fragments can have 1-4 and 1-N interactions, but the ring fragment drivers doesn't have this bug.

The make_config and insertion routines only pull fragment coordinates (not vdw parms) from the .dat files listed in the "# Fragment_Files" section. If you run cassandra with

# Verbose_Log
true

the vdw parameters used will be printed to the logfile in the section "Nonbond tables"

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 9 months ago #200 by jdmoore
Hi Ryan,

Indeed you appear to be correct that these aren't read during the simulation, but are they used during the fragment generation?

Aren't the fragments generated with these parameters? For example

.....GCMC/Methane_Butane/species2/frag1.inp

has ../fragments/frag_1_1.mcf 1

which means it reads the frag_1_1.mcf file with the incorrect LJ parameters in it. So then the fragments will be generated incorrectly?

I'm having a terrible time with my system. I have 125 molecules that I read in which match the energies in LAMMPS, but when I try to insert molecules from fragments, I am getting a positive configurational energy, I think because the fragments are incorrect, either because they were generated with the wrong LJ parameters or some other reason.

Thanks.

Josh

Please Log in to join the conversation.

More
7 years 9 months ago #202 by ryangmullen
Hi Josh,

You are correct that the Cassandra will read in the wrong LJ parameters when generating normal (or branch) fragments. We will certainly fix that. But that error is not causing Cassandra to generate the wrong fragments. If you look in the log file:

Examples/GCMC/Methane_Butane/species2/frag1/frag1.log

you will see that the only non-zero energy is the angle energy. In particular the intra molecule vdw is also zero. Here's why:

A united-atom butane model is composed of 4 pseudoatoms: 1-2-3-4. There are 6 atom pairs (1,2), (1,3), (1,4), (2,3), (2,4), (3,4). Nonbonded energies between all these pairs are ignored, per the TRAPPE website "Intramolecular 1-4 Lennard-Jones and Coulomb interactions are excluded." Other forcefields, e.g. OPLS, would scale the (1,4) interaction energy by 0.5, but still ignore all the nonbonded interactions between the other pairs of atoms.

When generating the fragment libraries, those 4 atoms are parsed into two fragments: 1-2-3 and 2-3-4. So regardless of forcefield, atoms 1 and 4 are never in the same simulation (when generating fragment libraries).
________________________________________

As for your system, what molecule are you modeling? Can you upload the log file so I can see what you are describing?

Ryan
The following user(s) said Thank You: jdmoore

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 9 months ago #206 by jdmoore
Hi Ryan,

Thank you for your help.

I think it might be working for MC now with rotations and translations. The VDW energy seems to be heading in the right direction. It is fairly far away from equilibrium it seems, which might be the problem. I reran all the fragment simulations with corrected parameters. I'm not sure if that helped or not.

Running a test from 125 molecules randomly inserted and 125 I read in for comparison.

I'm still not sure about the GCMC, because it doesn't seem like I am getting any successful deletions or insertions, but perhaps I need to be more patient.

Thanks.

Josh

Please Log in to join the conversation.

Time to create page: 0.116 seconds