Chem4Word / Version3-2

Version 2022 (3.2) of Chem4Word - A Chemistry Add-In for Microsoft Word
https://www.chem4word.co.uk
Other
21 stars 2 forks source link

Charge on bracket mismatch (in the editor only) #33

Closed tomyan112 closed 2 years ago

tomyan112 commented 2 years ago

Describe the bug There is a -ve charge on the upper right when it shouldn't The compound is Vinylcyclopentane To Reproduce Steps to reproduce the behaviour: It shows a -ve charge on the upper right. image

Expected behavior no charge on the upper right

Edit: Add markdown to display cml correctly CML Data

<cml:cml xmlns:conventions="http://www.xml-cml.org/convention/" xmlns:cml="http://www.xml-cml.org/schema" xmlns:cmlDict="http://www.xml-cml.org/dictionary/cml/" xmlns:nameDict="http://www.xml-cml.org/dictionary/cml/name/" xmlns:c4w="http://www.chem4word.com/cml" conventions="convention:molecular">
  <c4w:customXmlPartGuid>214865839cf7427a9766365f41799896</c4w:customXmlPartGuid>
  <cml:molecule id="m1" c4w:showBrackets="true">
    <cml:formula id="m1.f0" concise="C 7 H 12" />
    <cml:formula id="m1.f1" convention="chem4word:ResolvedFormula" inline="C7H12" concise="C 7 H 12" />
    <cml:formula id="m1.f2" convention="chem4word:ResolvedSmiles" inline="C=CC1CCCC1" concise="C 7 H 12" />
    <cml:name id="m1.n1" dictRef="chem4word:CalculatedInchi">1S/C7H12/c1-2-7-5-3-4-6-7/h2,7H,1,3-6H2</cml:name>
    <cml:name id="m1.n2" dictRef="chem4word:CalculatedAuxInfo">1/0/N:7,6,4,5,2,3,1/E:(3,4)(5,6)/rA:7nCCCCCCC/rB:s1;s1;s2;s3s4;s1;d6;/rC:32.7496,-24.3496,0;33.9955,-23.4444,0;33.2255,-25.8143,0;35.2414,-24.3496,0;34.7655,-25.8143,0;31.416,-23.5796,0;30.0823,-24.3496,0;</cml:name>
    <cml:name id="m1.n3" dictRef="chem4word:CalculatedInchikey">BEFDCLMNVWHSGT-UHFFFAOYSA-N</cml:name>
    <cml:name id="m1.n4" dictRef="chem4word:ResolvedIupacname">ethenylcyclopentane</cml:name>
    <cml:atomArray>
      <cml:atom id="a1" elementType="C" x2="601.7104" y2="600.8009" />
      <cml:atom id="a2" elementType="C" x2="625.9808" y2="583.1674" />
      <cml:atom id="a3" elementType="C" x2="610.9808" y2="629.3326" />
      <cml:atom id="a4" elementType="C" x2="650.2513" y2="600.8009" />
      <cml:atom id="a5" elementType="C" x2="640.9808" y2="629.3326" />
      <cml:atom id="a6" elementType="C" x2="575.7296" y2="585.8009" />
      <cml:atom id="a7" elementType="C" x2="549.7487" y2="600.8009" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b1" atomRefs2="a2 a1" order="S" />
      <cml:bond id="b2" atomRefs2="a1 a3" order="S" />
      <cml:bond id="b3" atomRefs2="a4 a2" order="S" />
      <cml:bond id="b4" atomRefs2="a3 a5" order="S" />
      <cml:bond id="b5" atomRefs2="a5 a4" order="S" />
      <cml:bond id="b6" atomRefs2="a1 a6" order="S" />
      <cml:bond id="b7" atomRefs2="a6 a7" order="D" c4w:placement="Clockwise" />
    </cml:bondArray>
  </cml:molecule>
</cml:cml>
MikeWilliams-UK commented 2 years ago

over to you @deadlyvices for this

MikeWilliams-UK commented 2 years ago

Definitely a Display/Editor issue @deadlyvices (tested in main)

image

MikeWilliams-UK commented 2 years ago

Included in V3.2.3 Beta 3