PistoiaHELM / HELMWebEditor

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

In-line HELM monomers are not connected #160

Closed ClairePA closed 6 years ago

ClairePA commented 6 years ago

I can enter the following HELM string PEPTIDE1{A.[*C(=O)[C@H](C)N(*)C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0

but the in-line monomer is not connected to anything.

image

scilligence commented 6 years ago

Web Editor depends on HELM Web Service to convert the smiles into molfile. But the web services doesn't return R1/R2. The web service is:

http://54.91.164.146/WebService/service/Conversion/Molfile

And it returns:

` CDK 0222181427

8 7 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 0 0 0 0 0 0 0 0 0 0 0 0 1.2990 -0.7500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.2990 -2.2500 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 2.5981 -0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 2.5981 1.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.8971 -0.7500 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 3.8971 -2.2500 0.0000 0 0 0 0 0 0 0 0 0 0 0 0 5.1962 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 2 3 2 0 0 0 0 2 4 1 0 0 0 0 4 5 1 6 0 0 0 4 6 1 0 0 0 0 6 7 1 0 0 0 0 6 8 1 0 0 0 0 M END `

ClairePA commented 6 years ago

Hi Markus,

is this something you could look at?

MarkusWeisser commented 6 years ago

Square brackets are currently mandatory around the symbol. If you paste the following HELM into the editor: `PEPTIDE1{A.[[]C(=O)C@HN([*])C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0`

this will be automaticall converted into PEPTIDE1{A.[[[R1]]C(=O)[C@H](C)N([R2])C].A}$$$$V2.0

but editor is not able to show the structure again. I guess the two square brackets around R1 are the problem. Manually removing one square bracket around R1 gives correkt structure. Is the conversion done by toolkit?

scilligence commented 6 years ago

Markus, could you wrap the HELM string in GitHub code format? Otherwise the text is escaped. Thanks.

scilligence commented 6 years ago

I guess Markus is using this HELM string:

PEPTIDE1{A.[[*]C(=O)[C@H](C)N([*])C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0

It does works. Here is what I see: image

ClairePA commented 6 years ago

PEPTIDE1{A.[[*]C(=O)[C@H](C)N([*])C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0 works for me too.

However, I go back to Roger's point that it should be valid to use with no square brackets since it is part of the SMILES definition. By the way, if I change to: `PEPTIDE1{A.[[:2]C(=O)C@HN([*:1])C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0` I get image which is better than the structure in the comment above.

How much effort is it to allow * with no square brackets?

ClairePA commented 6 years ago

Retested. The test HELM string still results in disconnected monomers.

ClairePA commented 6 years ago

See the examples below. When * is used instead of [*] it is accepted as valid, but not handled correctly meaning that the monomers are not attached in the structure. You can see this where I have used and [] in different parts of this SMILES below. Actually all these SMILES should be acceptable.

PEPTIDE1{A.[*C(=O)[C@H](C)N(*)C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0 image

PEPTIDE1{A.[[*]C(=O)[C@H](C)N(*)C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0 image

PEPTIDE1{A.[*C(=O)[C@H](C)N*C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0 image

PEPTIDE1{A.[[*]C(=O)[C@H](C)N([*])C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.0 image

The canvas view looks fine. image

MarkusWeisser commented 6 years ago

The example no. 3 is missing a pair of brakets: PEPTIDE1{A.[C(=O)C@HN()C |$_R2;;;;;;_R1;;;$|].A}$$$$V2.

Beside that, all examples are valid in toolkit and generated structure images look good.

ClairePA commented 6 years ago

I am using http://54.83.135.171/WebService/FirstPage.html and the images are still wrong.

Tony, can you check that the latest version of the webservices are being used on this site please?

Thanks.

ClairePA commented 6 years ago

See circulated spreadsheet for expected behaviour.

ClairePA commented 6 years ago

Duplicate of #210. Close here and continue the discussion on that issue.