News:

SMF - Just Installed!

Main Menu

LAMMPS.trj file to cif

Started by bphan, May 25, 2022, 12:23:56 AM

Previous topic - Next topic

bphan

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


David Dubbeldam

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

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

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

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

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

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

Is the problem with how my cif file is set up?

bphan

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

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

Nice! That was the final piece to make this work. thank you so much.