Giter VIP home page Giter VIP logo

Comments (7)

johnmay avatar johnmay commented on August 28, 2024

No it's not an option. The reason it is italic is because people use labels other than R, for example W, Y and even B. Using italics allows us to visually distinguish these from tungsten, yttrium and boron.

image

Note if you want an abbreviation, e.g. -CO2H these will be plain font. We could add option for it but what is the use case, just you don't like it?

from depict.

miracle1111111 avatar miracle1111111 commented on August 28, 2024

image
image

Thank you very much for your reply. I want to generate the same picture as the literature, because in the literature, the substituents are plain fonts. The superscripts of substituents in the literature are sometimes in the lower right corner.
image
As you mentioned, the chemical structure pictures generated by the CDK for the above CONH2, CH3, etc. are all expanded, and I don’t know how to generate this.
I really want to know how to solve these problems. thank you very much.

from depict.

johnmay avatar johnmay commented on August 28, 2024

You can use Abbreviations API to contract functional groups.

Why do you want to generate the same picture as in the literature? Even including the ; on the R2 label and the bent ketone bond? The super/subscript is purely a stylistic and not something I think is useful to control in CDK atm - these types of details are more akin to a sketcher (e.g. ChemDraw)

from depict.

miracle1111111 avatar miracle1111111 commented on August 28, 2024

Thank you for your reply. Not including the ; I added it by mistake. Because I want to generate the same picture as the literature to train the model, so the effect is better. Finally, I want to change by modifying the source code, but in the source code, I did not find where the settings for the substitute font are

from depict.

johnmay avatar johnmay commented on August 28, 2024

Okay - since this is a 1 off case I think it's best if you change your local version. You need to modify: StandardAtomGenerator.generatePseudoSymbol()

from depict.

johnmay avatar johnmay commented on August 28, 2024

I've add the following option:

depictgen = depictgen.withParam(StandardGenerator.PseudoFontStyle.class,
                                                          Font.PLAIN);

to configure this. The superscript vs subscript I've left for now.

from depict.

miracle1111111 avatar miracle1111111 commented on August 28, 2024

from depict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.