PistoiaHELM / HELMWebEditor

Web browser based editor for drawing HELM macromolecules.
MIT License
18 stars 10 forks source link

* monomers can't be ambiguously connected to a group #191

Closed ClairePA closed 5 years ago

ClairePA commented 6 years ago

A direct connection between a * CHEM monomer and a group is valid

CHEM1{*}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,1:R1-1:R1$$$V2.0

However, if I create a group around the peptide and draw an ambiguous connection between the group and the CHEM monomer, then the HELM the webeditor generates is below `CHEM1{}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,1:R1-?:?$$$V2.0` and the webservices claim this is not valid.

If the entire bond is ambiguous then it is valid CHEM1{*}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,?:?-?:?$$$V2.0

but if you specify the position or the R group on the CHEM{} then it becomes invalid `CHEM1{}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,?:1-?:?$$$V2.0- invalid CHEM1{*}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,R1:?-?:?$$$V2.0` - invalid

Other monomers have the same problem `PEPTIDE1{}|PEPTIDE2{A.C}$PEPTIDE1,PEPTIDE2,1:R1-?:?$$$V2.0 not valid PEPTIDE1{A.C}|RNA1{*}$RNA1,PEPTIDE1,1:R2-?:?$$$V2.0` not valid

I think all these HELM strings should be valid.

Other monomers can be ambiguously connected to a group without problems, for example the following are valid HELM strings: PEPTIDE1{A}|PEPTIDE2{A.C}$PEPTIDE1,PEPTIDE2,1:R1-?:?$$$V2.0 BLOB1{Bead}|PEPTIDE1{A.C}$PEPTIDE1,BLOB1,?:?-?:?$$$V2.0 PEPTIDE1{A.C}|RNA1{P}$RNA1,PEPTIDE1,1:R2-?:?$$$V2.0 PEPTIDE1{A.C}|RNA1{R}$RNA1,PEPTIDE1,1:R2-?:?$$$V2.0

MarkusWeisser commented 6 years ago

During validation, toolkit checks for valid connections. If a monomer is not specified ("*"-symbol), the attachment groups are also not specified. So, if monomer is unspecified, the attachment group must be unspecified as well (?-symbol). Toolkit behavior seems to be correct in my opinion.

ClairePA commented 6 years ago

This is a reasonable approach, but that would mean that CHEM1{*}|PEPTIDE1{A.C}$CHEM1,PEPTIDE1,1:R1-1:R1$$$V2.0 should also be invalid, whereas the toolkit says that it is valid.

ClairePA commented 5 years ago

Will separate out the various aspects into new issues for clarity. Closing this log.