From: Vaidyanathan Sethuraman (vsethura_at_umn.edu)
Date: Wed Nov 01 2017 - 22:40:07 CDT

Hi Axel

Thanks a lot for the help and the tip. It works!!

Thanks again

Best Regards

Vaidyanathan M S

Postdoctoral Fellow
Kevin Dorfman's Group
Department of Chemical Engineering and Materials Science
University of Minnesota Twin Cities

On Wed, Nov 1, 2017 at 9:03 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:

>
>
> On Wed, Nov 1, 2017 at 7:59 PM, Vaidyanathan Sethuraman <vsethura_at_umn.edu>
> wrote:
>
>> Hi Axel/VMD Users
>>
>> Please find the script and datafiles that I use for testing
>>
>> testinp.data - datafile containing atom and bond info
>> afterguess.data - datafile generated by topotools
>> VMD_commands.png - A snapshot of the VMD commands used.
>>
>> VMD Version - 1.9.3 - Tested in both Windows 10 and Mac OS/X
>>
>> In testinp.data, the atom type of atom id 2 is also 2, whereas after
>> using topo writelammpsdata, the atom type of atomid 2 is 12.
>>
>> I hope I have given all the required information. Please let me know if I
>> am missing something or doing something stupid which is obvious.
>>
>
> ​no, everything is fine. the issue is, that in order to determine
> numerical atom types that match LAMMPS' requirements (start at 1,
> consecutive), those need to be sorted​ and compiled into a unique list.
> since those atom types cannot be assumed to be numerical (LAMMPS is the
> exception, not the rule), the list is sorted alphabetically, which puts '2'
> between '1' and '19'. so the trick is to override the atom type with
> something that sorts both numerically and alphabetically in the same way,
> e.g. by prepending zeroes. like in this script:
>
>
> ​package require topotools
>
> topo readlammpsdata testinp.data full
>
> # prepend type name for single digit types with a zero, so they sort
> properly
> foreach s [list 1 2 3 4 5 6 7 8 9] {
> set sel [atomselect top "type $s"]
> $sel set type "0$s"
> $sel delete
> }
>
> topo guessangles
> topo guessdihedrals
> topo writelammpsdata topology-added.data full
> ​
> axel.
>
>
>
>>
>> Thanks
>>
>> Best Regards
>>
>> Vaidyanathan M S
>>
>> Postdoctoral Fellow
>> Kevin Dorfman's Group
>> Department of Chemical Engineering and Materials Science
>> University of Minnesota Twin Cities
>>
>> On Wed, Nov 1, 2017 at 5:38 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Nov 1, 2017 at 5:34 PM, Vaidyanathan Sethuraman <
>>> vsethura_at_umn.edu> wrote:
>>>
>>>> Hi VMD/LAMMPS users
>>>>
>>>> I am trying to use topotools in VMD. Problem I am trying to resolve is
>>>> as follows. Please let me know if there is an easier way as well. I have a
>>>> LAMMPS datafile with atom IDs and bond list with bond data. I need the
>>>> angle and dihedral list.
>>>>
>>>> So I use
>>>> topo readlammpsdata filename full
>>>> topo guessangles
>>>> topo guessdihedrals
>>>> topo writelammpsdata newfilename full
>>>>
>>>> This works perfectly except that when the number of atomtypes is
>>>> greater than 10, it automatically renumbers the atomtypes . How can I stop
>>>> that ? In a nutshell can I keep the atomtypes not to change while rewriting
>>>> LAMMPS datafile.
>>>>
>>>
>>> which version of topotools is this with?
>>> can you post a minimal example file where this happens?​
>>>
>>> ​axel.​
>>>
>>>
>>>
>>>
>>>> I tried going through mailing list. It would be great if you could
>>>> point out had it been discussed and I missed it .
>>>>
>>>> PS: I sent the same email yesterday , but did not see the email in the
>>>> mailing list. Please excuse if this is a replicate.
>>>>
>>>> Thanks in advance
>>>>
>>>> Vaidyanathan M S
>>>>
>>>
>>>
>>>
>>> --
>>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>> International Centre for Theoretical Physics, Trieste. Italy.
>>>
>>
>>
>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.
>