Author Topic: LAMMPS.trj file to cif  (Read 666 times)

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
LAMMPS.trj file to cif
« on: May 25, 2022, 12:23:56 AM »
Hi all,

I have an amorphous polymer system that I ran an MD equilibration on. Im trying to use RASPA to calculate Henrys constant now and need to convert the lammps.trj file to cif. Right now im taking the last frame of the lammps file and changing the format to a cif file. The calculation runs but the simulated values are garbage. For 6 different gasses im getting the same value. I also tried calculating the IdealGasRosenbluthWeight before and inputting it but im just getting 1 for all values.

Im confused on where im going wrong, any input is appreciated.
The polymer system is polyethylene, the cif file has ~4000 atoms.

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #1 on: May 25, 2022, 07:29:38 PM »
My structures file

David Dubbeldam

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #2 on: May 27, 2022, 01:29:11 PM »
Have a look at the example cif files in RASPA, for example IRMOF-1
(structures/mofs/cif/IRMOF-1.cif)

loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_charge
Zn1      Zn     0.2934     0.2066     0.2066     0
O1       O      0.25       0.25       0.25       0
O2       O      0.2819     0.2181     0.134      0
C1       C      0.25       0.25       0.1113     0
C2       C      0.25       0.25       0.0538     0
C3       C      0.2829     0.2171     0.0269     0
H1       H      0.3049     0.1951     0.0448     0

The _atom_site_type_symbol needs to be the chemical element. The _atom_site_label is used in the forcefield definition as a label of the atom.

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #3 on: May 27, 2022, 06:22:10 PM »
I did as you said but for the 6 gasses, Im getting the same value for Henrys constant. Do you know why this could be the case? Thanks again!!

David Dubbeldam

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #4 on: May 28, 2022, 10:17:05 PM »
Did you define the forcefield for your framework atoms?
(i.e. all Lennard-Jones parameters for all your atom types, and all the charges)

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #5 on: May 30, 2022, 09:36:25 PM »
Yes, My system is polyethylene so I only have hc and c3 type atoms, attached is the pseudo atom and forcefield file I made/I have preloaded from one of the provided frameworks.
Thanks for your quick responses, I really appreciate your help in this bind.

David Dubbeldam

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #6 on: May 31, 2022, 04:35:26 PM »
All atom-types need to be defined in the 'pseudo_atoms.def', so 'c', 'c3', 'hc', but also all atoms of the probe molecule.
Next define LJ parameters all of these for 'force_field_mixing_rules.def'.
The mixing rules with the be used to computed cross-interactions between all of the atoms.

You seems to have placed them in 'force_field.def' which is means to overwrite interactions for systems where mixing rules are not applicable. But these are no interactions defined then between {'c', 'c3', 'hc'} and all of the adsorbate atoms of the probe molecules.

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #7 on: May 31, 2022, 11:07:09 PM »
Ah ok, this is making a lot more sense.
I have the mixing force fields and pseudo atoms defined, and the calculations are generating different values for the Henrys constant now though, so most things are working right. 
But im running into the problem of not seeing my hc and c3 being included in the mixing rules. Attached are the inputs.
I think the c3 is being overwritten by the C? Should i just change the potential of C to c3?

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #8 on: May 31, 2022, 11:37:15 PM »
Is the problem with how my cif file is set up?

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #9 on: May 31, 2022, 11:46:34 PM »
Also when i have more complicated systems there'll be for example, carbons with different LJ potentials, so like c3 and ca that I would have to input, how would i input them so it won’t be overwritten?

David Dubbeldam

  • Full Member
  • ***
  • Posts: 214
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #10 on: June 02, 2022, 05:44:08 PM »
About the gif-file: The _atom_site_type_symbol needs to be the chemical element. The _atom_site_label is used in the forcefield definition as a label of the atom.

bphan

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: LAMMPS.trj file to cif
« Reply #11 on: June 06, 2022, 05:53:49 PM »
Nice! That was the final piece to make this work. thank you so much.