Okay,

But there's no COOH in the Lidociane example...? It's certainly possible to
do what you want but you'll need to do it manually by deleting/adding bonds.

Here's a rough idea:
https://gist.github.com/johnmay/9c814049688cc905c806b9738212809b

> import org.openscience.cdk.exception.CDKException;
> import org.openscience.cdk.interfaces.IAtom;
> import org.openscience.cdk.interfaces.IAtomContainer;
> import org.openscience.cdk.interfaces.IBond;
> import org.openscience.cdk.interfaces.IChemObjectBuilder;
> import org.openscience.cdk.isomorphism.Pattern;
> import org.openscience.cdk.silent.SilentChemObjectBuilder;
> import org.openscience.cdk.smiles.SmilesGenerator;
> import org.openscience.cdk.smiles.SmilesParser;
> import org.openscience.cdk.smiles.smarts.SmartsPattern;
> import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
>
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.Arrays;
> import java.util.List;
>
> public class CreateAminoAcid {
>
>     private static final IChemObjectBuilder BLDR = 
> SilentChemObjectBuilder.getInstance();
>
>     private static final Pattern AMINE_PATTERN;
>     private static final Pattern ACID_PATTERN;
>
>     static  {
>         try {
>             AMINE_PATTERN = SmartsPattern.create("[NX3v3h2]", null);
>             ACID_PATTERN = SmartsPattern.create("[OX2v2H1][CX3v4]=[OX1v2H0]", 
> null);
>         } catch (IOException ex) {
>             throw new InstantiationError("Bad SMARTS!" + ex.getMessage());
>         }
>     }
>
>     private static List<IAtomContainer> fuse(IAtomContainer amine, 
> IAtomContainer acid) throws
>                                                                               
>           CloneNotSupportedException {
>
>         // optional
>         AtomContainerManipulator.suppressHydrogens(amine);
>         AtomContainerManipulator.suppressHydrogens(acid);
>
>         List<IAtomContainer> result = new ArrayList<>();
>
>         int[][] amineHits = 
> AMINE_PATTERN.matchAll(amine).uniqueAtoms().toArray();
>         int[][] acidHits  = 
> ACID_PATTERN.matchAll(acid).uniqueAtoms().toArray();
>
>
>         for (int[] amineHit : amineHits) {
>             for (int[] acidHit : acidHits) {
>                 IAtomContainer fused = amine.clone();
>                 fused.add(acid.clone());
>
>                 IAtom nAtom = fused.getAtom(amineHit[0]);
>                 IAtom oAtom = fused.getAtom(amine.getAtomCount() + 
> acidHit[0]);
>                 IAtom cAtom = fused.getAtom(amine.getAtomCount() + 
> acidHit[1]);
>
>                 // 1. remove bond and adjust N valence
>                 // XXX: this can be much faster by moving to the back first 
> and then deleting
>                 fused.removeAtomAndConnectedElectronContainers(oAtom);
>                 
> nAtom.setImplicitHydrogenCount(nAtom.getImplicitHydrogenCount()-1);
>
>                 // This looks confusion but is essentially: 'new Bond(nAtom, 
> cAtom, SINGLE)' using a factory
>                 // (or builder as called here)
>                 fused.addBond(BLDR.newInstance(IBond.class, nAtom, cAtom, 
> IBond.Order.SINGLE));
>
>                 result.add(fused);
>             }
>         }
>
>         return result;
>     }
>
>     public static void main(String[] args) throws CDKException, 
> CloneNotSupportedException {
>
>
>         SmilesParser       smipar = new SmilesParser(BLDR);
>         SmilesGenerator    smigen = SmilesGenerator.isomeric();
>
>         // input list of amines/acids
>         List<String> amines = Arrays.asList("CC1=CC=CC(C)=C1N");
>         List<String> acids  = Arrays.asList("CC(O)=O");
>
>         for (String amine : amines) {
>             for (String acid : acids) {
>                 IAtomContainer amineMol = smipar.parseSmiles(amine);
>                 IAtomContainer acidMol  = smipar.parseSmiles(acid);
>
>                 for (IAtomContainer fused : fuse(amineMol, acidMol)) {
>                     System.out.println(smigen.create(fused));
>                 }
>             }
>         }
>
>     }
> }
>
>
Regards,
John W May
john.wilkinson...@gmail.com

On 2 May 2016 at 22:38, hanouna nouna <hanounanouna...@yahoo.fr> wrote:

> yes somthing like that, i have to break the double bound between C and O
> from the COOH and the H from NH2 to create the novel amino acide similar to
> Lidociane if you can take me wich package i use to break theme in CDK
>
>
> Le Lundi 2 mai 2016 23h18, John M <john.wilkinson...@gmail.com> a écrit :
>
>
> Okay, but what's the input?
>
> For example for Lidocaine, it looks like a two step synthesis, it's not
> simply just combined a random amine and acid:
> [image: Inline images 4][image: Inline images 5]
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 2 May 2016 at 21:09, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> yes, i have to create an amino acide similar to Lidociane or to
> furano-pyrimidine
>
>
> Le Lundi 2 mai 2016 21h48, John M <john.wilkinson...@gmail.com> a écrit :
>
>
> Do you have an example of an amine and acid you want to make an amino acid
> out of?
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 2 May 2016 at 20:36, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> thanks for answering, about your first question i download the acides and
> the amines from ChemSpider database in mol format, and i wont to make a
> novel amino acid from this two fragments , and i will use the first way
> (using SMARTS) to create it .
>
>
> Le Lundi 2 mai 2016 21h21, John M <john.wilkinson...@gmail.com> a écrit :
>
>
> What do the amines look like and what to the acids look like? It sounds
> like you're not simply building a polypeptide but want to make *novel *amino
> acids from an amine and an acid? In bonding these to things together any
> algorithm can't simply know which atoms you want to bond and you must tell
> it.
>
> There are two ways this is typically done but depends on your use case:
>  a) Use a SMARTS pattern/reaction transformation (e.g. SMIRKS) this is
> okay but handling unwanted bonds may be a problem if you're patterns aren't
> strict enough.
>  b) Use attachment points/leaving groups to specify where monomers can be
> bound. This requires rewriting your monomer set but is more robust and
> efficient if you building polymers. This is the approach taken by HELM
> <http://www.pistoiaalliance.org/projects/hierarchical-editing-language-for-macromolecules-helm/>
> .
>
> Unfortunately both of these are rather involved.
>
> - John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 1 May 2016 at 19:23, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> hello i have  a set of fragment acides.mol and a set of fragments
> amine.mol in my disc  and i wont to read an acide and an amin and to create
> an amino acide i try with this code but i have an error
> import java.io.FileNotFoundException;
> import java.io.InputStream;
>
> import org.openscience.cdk.BioPolymer;
> import org.openscience.cdk.exception.CDKException;
> import org.openscience.cdk.io.MDLReader;
> import org.openscience.cdk.tools.ProteinBuilderTool;
>
> public class AA {
>     public static void main(String[] args) throws CDKException,
> FileNotFoundException{
>         String filename1 = "C:/amine/amine_59.mol";
>
>         InputStream ins
> =InputStream.class.getClass().getClassLoader().getResourceAsStream(filename1);
>         MDLReader reader = new MDLReader(ins);
>     String filename2 = "C:/acide/acide_1.mol";
>         InputStream in
> =InputStream.class.getClass().getClassLoader().getResourceAsStream(filename2);
>         MDLReader read = new MDLReader(in);
>         BioPolymer crambin = ProteinBuilderTool.createProtein(
> filename1+filename2 );
>         System.out.println("Crambin has " + crambin.getAtomCount() +"
> atoms.");
> }
> }
> the error is java.lang.NullPointerException
> i wate your answer please
> thanks
>
>
> Le Vendredi 29 avril 2016 17h06, John M <john.wilkinson...@gmail.com> a
> écrit :
>
>
> Hi Hanouna,
>
> Sorry I didn't see your other messages, they were marked as spam due the
> writing style and yahoo.fr authentication failures.
>
> If you're still having trouble building/using the CDK in an IDE (e.g.
> Eclipse) I put together a guide here:
> https://github.com/cdk/cdk/wiki/Building-CDK
>
> I've you're new CDK you should use the least release 1.5.14. Also there
> are more relevant pages/updates on the GitHub wiki.
>
> John
>
> Regards,
> John W May
> john.wilkinson...@gmail.com
>
> On 27 April 2016 at 19:39, hanouna nouna <hanounanouna...@yahoo.fr> wrote:
>
> hello
> i have to create an amino acide from a library of fragment acide and a
> library of fragments amine if you can help me with packages of CDK that i
> have to use that will be a big pleasur to me
> and thank you so mutch
>
>
>
>
>
>
>
>
>
>
>
>
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to