Dear Jakub, On Thursday, October 27, 2016 at 6:48:56 PM UTC+2, Jakub Krajniak wrote:
> There should be no issue with creating a bond definition that contains > multiple beads, like here: > <bonded> > <bond> > <name>bond</name> > <beads> > CHAIN:A1 CHAIN:A2 > CHAIN:A2 CHAIN:A3 > CHAIN:A3 CHAIN:A4 > CHAIN:A4 CHAIN:A5 > CHAIN:A5 CHAIN:A6 > CHAIN:A6 CHAIN:A7 > CHAIN:A7 CHAIN:A8 > </beads> > </bond> > </bonded> > > Did you get some error if you have xml topology defined in that way? Could > you provide us the error message? > After reading your message I went to test it and suddenly it just worked. As I was sure that I had an error before, I kept playing with the files and I notice that if I use tabs instead of spaces before these lines: CHAIN:A1 CHAIN:A2 CHAIN:A2 CHAIN:A3 CHAIN:A3 CHAIN:A4 CHAIN:A4 CHAIN:A5 CHAIN:A5 CHAIN:A6 CHAIN:A6 CHAIN:A7 CHAIN:A7 CHAIN:A8 then it doesn't work. Below, topol_tabs.xml is the file with tabs in in the bonds listing, and topol_spac.xml is the file with white spaces only. I use cat -T just to make the tabs visible and then get a diff so you can see that, except for that tab-space difference, the two .xml files are otherwise identical: $ cat -T topol_tabs.xml >1.tmp $ cat -T topol_spac.xml >2.tmp $ diff 1.tmp 2.tmp 19,25c19,25 < ^I^I^I^ICHAIN:A1 CHAIN:A2 < ^I^I^I^ICHAIN:A2 CHAIN:A3 < ^I^I^I^ICHAIN:A3 CHAIN:A4 < ^I^I^I^ICHAIN:A4 CHAIN:A5 < ^I^I^I^ICHAIN:A5 CHAIN:A6 < ^I^I^I^ICHAIN:A6 CHAIN:A7 < ^I^I^I^ICHAIN:A7 CHAIN:A8 --- > CHAIN:A1 CHAIN:A2 > CHAIN:A2 CHAIN:A3 > CHAIN:A3 CHAIN:A4 > CHAIN:A4 CHAIN:A5 > CHAIN:A5 CHAIN:A6 > CHAIN:A6 CHAIN:A7 > CHAIN:A7 CHAIN:A8 $ csg_dump --top topol_tabs.xml an error occurred: Wrong number of elements in bead: CHAIN:A2 CHAIN:A2 $ csg_dump --top topol_spc.xml (... expected output is shown here ...) $ Also you can check how VOTCA is interpreting topology by using csg_dump: > csg_dump --top topol.xml > > and you can look into the exclusion lists retrieved from the topology by: > csg_dump --top topol.xml --excl > > If bonded section is read correctly then you should see it in the > exclusion lists. > Your reply made me realize that problem with the tab characters. Maybe the XML parser is getting confused with a mix of tabs and white spaces? In any case, now it works correctly (as long as only spaces are used). and I see the proper exclusions when I run csg_dump with --excl. Cheers, Gustavo -- You received this message because you are subscribed to the Google Groups "votca" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/votca. For more options, visit https://groups.google.com/d/optout.
