merging/outputing two lammps data files

442 views
Skip to first unread message

Vasiliy Triandafilidi

unread,
Sep 13, 2015, 9:26:03 PM9/13/15
to MDnalysis discussion
Dear Friends,

I am trying to merge two Lammps data files and obtain the resulting data file for further simulations*.

It can be done via VMD, but I am looking for a beautiful Python solution.
Mdanalysis can import lammps data files but can not output it. 

Can it be done as simple as :


1) import data files to universes
2) write all atomic coordinates of from one universe, write coordinates from the other universe
3) write bond information,
4) angle information

or there are some other things to consider?

Thank you,
Vasiliy.

*Lets say I have 10 polymers of length n and 10 polymers of length m.
I want to have a new system where polymers of the length n are on the left and polymers of the length m on the right. The total number of chains are 20.

Richard Gowers

unread,
Sep 14, 2015, 4:49:16 AM9/14/15
to MDnalysis discussion
Hey Vasiliy

I think what you're looking for is MDAnalysis.Merge http://pythonhosted.org/MDAnalysis/documentation_pages/core/AtomGroup.html#MDAnalysis.core.AtomGroup.Merge

You should be able to pass it two AtomGroups and it returns a new Universe with the bonds etc copied over (make sure you've updated to 0.11.0).

We can't write data files currently, but it would be a very cool addition.  If you wanted to have a go we could help get you started.

Richard

Vasiliy Triandafilidi

unread,
Sep 14, 2015, 11:32:31 AM9/14/15
to MDnalysis discussion
I will be happy to.
I will post an issue on github then.

Vasiliy.
Reply all
Reply to author
Forward
0 new messages