A small bug with the molblock example in docs.
firtrfl opened this issue · 1 comments
firtrfl commented
Describe the bug
There is a problem with molblock example in the docs, which does not render.
To Reproduce
It is an example that is shown on https://www.rdkitjs.com/
Specifically look at the example under "Also, it's often useful to generate molecule renderings where the coordinates of a core is constrained:"
In there there is a flowing molblock:
var template = `
Mrv2014 10192005332D
0 0 0 0 0 999 V3000
M V30 BEGIN CTAB
M V30 COUNTS 6 6 0 0 0
M V30 BEGIN ATOM
M V30 1 C -5.7917 2.5817 0 0
M V30 2 N -7.1253 1.8117 0 0
M V30 3 C -7.1253 0.2716 0 0
M V30 4 C -5.7917 -0.4984 0 0
M V30 5 C -4.458 0.2716 0 0
M V30 6 N -4.458 1.8117 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 2 2 3
M V30 3 1 3 4
M V30 4 2 4 5
M V30 5 1 5 6
M V30 6 2 1 6
M V30 END BOND
M V30 END CTAB
M END
`;
The problem is that this example has two spaces in the beginning of each line. And when you press run button it does not render. If you remove the two spaces from each line it renders. It seems that the same molblock string is present in other examples node, vue, react, but I have not tested them.
This is the working one:
var template = `
Mrv2014 10192005332D
0 0 0 0 0 999 V3000
M V30 BEGIN CTAB
M V30 COUNTS 6 6 0 0 0
M V30 BEGIN ATOM
M V30 1 C -5.7917 2.5817 0 0
M V30 2 N -7.1253 1.8117 0 0
M V30 3 C -7.1253 0.2716 0 0
M V30 4 C -5.7917 -0.4984 0 0
M V30 5 C -4.458 0.2716 0 0
M V30 6 N -4.458 1.8117 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 2 2 3
M V30 3 1 3 4
M V30 4 2 4 5
M V30 5 1 5 6
M V30 6 2 1 6
M V30 END BOND
M V30 END CTAB
M END
`;