Giter Club home page Giter Club logo

cheminformatics-microservice's People

Contributors

cs76 avatar dependabot[bot] avatar github-actions[bot] avatar kohulan avatar nishasharma14 avatar nrayya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cheminformatics-microservice's Issues

504 Gateway Time-out

Images with a lot of structures will need more time for processing. Increase the time out to allow this and avoid 504 timeout errors.

Example

image

POST: https://api.naturalproducts.net/chem/process

{"reference":"chem_instance_11","path":"https://media.springernature.com/lw685/springer-static/image/art%3A10.1186%2Fs13321-021-00538-8/MediaObjects/13321_2021_538_Fig9_HTML.png"}

Add Aromatic Ring descriptor using CDK

java code block from @JonasSchaub

SmilesParser tmpSmiPar = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IAtomContainer tmpMolecule = tmpSmiPar.parseSmiles("C1=CC=CC=C1");

//arguments might need to be changed to be in accordance with RDKit method
Aromaticity tmpAromaticity = new Aromaticity(ElectronDonation.daylight(), Cycles.cdkAromaticSet());

tmpAromaticity.apply(tmpMolecule);

//also, the cycle finder used here is debatable
IRingSet tmpMCBRings = Cycles.mcb(tmpMolecule).toRingSet();
int tmpNumberOfAromaticRings = 0;
for (IAtomContainer tmpRingContainer: tmpMCBRings.atomContainers()) {
    boolean tmpAreAllRingBondsAromatic = true;
    for (IBond tmpBond: tmpRingContainer.bonds()) {
        if (!tmpBond.isAromatic()) {
            tmpAreAllRingBondsAromatic = false;
            break;
        }
    }
    if (tmpAreAllRingBondsAromatic) {
        tmpNumberOfAromaticRings++;
    }
}
System.out.println(tmpNumberOfAromaticRings);

Fix the mol block display

Currently a mol block is being displayed like this:

"\n  CDK     03232309132D\n\n 14 15  0  0  0  0  0  0  0  0999 V2000\n    2.6838    2.4465    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    2.2200    1.0200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    3.1000   -0.1900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    2.2200   -1.4000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    0.8000   -0.9400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    0.8000    0.5600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.5000    1.3100    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.5000    2.8100    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.8000    0.5600    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.8000   -0.9400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -3.0989   -1.6902    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.5000   -1.6900    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.5000   -3.1900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -3.0989    1.3102    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  2  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  2  0  0  0  0\n  7  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  2  0  0  0  0\n 10 12  1  0  0  0  0\n  5 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n  9 14  1  0  0  0  0\nM  END\n$$$$\n"

It should be displayed like this:

  CDK     03232309152D

 14 15  0  0  0  0  0  0  0  0999 V2000
    2.6838    2.4465    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.2200    1.0200    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    3.1000   -0.1900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.2200   -1.4000    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.8000   -0.9400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.8000    0.5600    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5000    1.3100    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5000    2.8100    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   -1.8000    0.5600    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
   -1.8000   -0.9400    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.0989   -1.6902    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5000   -1.6900    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
   -0.5000   -3.1900    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.0989    1.3102    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  3  4  2  0  0  0  0
  4  5  1  0  0  0  0
  5  6  2  0  0  0  0
  2  6  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  2  0  0  0  0
  7  9  1  0  0  0  0
  9 10  1  0  0  0  0
 10 11  2  0  0  0  0
 10 12  1  0  0  0  0
  5 12  1  0  0  0  0
 12 13  1  0  0  0  0
  9 14  1  0  0  0  0
M  END
$$$$


Parse SDF to autofill a predefined template

When a post request is made to the API services, can we loop through the structures and fill in the following fields from the SDF properties/structure details and respond back with the following JSON structure?

{
	"standard_inchi": null,
	"cannonical_smiles": null,
	"name": null,
	"cas": null,
	"synonyms": [],
	"iupac_name": null,
	"sdf": null,
	"properties": {
		"found_in_databases": []
	},
	"citations": [{
			"doi": null,
			"type": "publication"
		}/
		{
			"href": null,
			"identifier": null,
			"source": null,
			"type": "database"
		}
	]
}

Return type to be MOL instead of SDF

When structure-related operations are performed, the return mol format should be MOL instead of SDF. In terms of descriptor calculation, if the return format is SDF, the calculated descriptors should be added as properties to the SDF format and returned.

Create Tanimoto Heatmap

Take a list of smiles with commas separated and return a matrix of Tanimoto similarities with each other

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.