User 86810cf9fa
14-03-2007 17:00:49
Dear support,
I would like to know whether it is possible, with marvin api, to extract from a PDB file all the ligands and generate a sdfile.
Best regards
Severine
User f359e526a1
15-03-2007 07:46:51
Hello, I am sure most of the job can be done, but my colleague who knows this part of the API is out of office for the moment. I forwarded your request, they will answer ASAP.
ChemAxon efa1591b5a
19-03-2007 10:18:51
User 86810cf9fa
19-03-2007 16:28:50
Miklos,
Thank you for your answer.
I followed your instructions. This is my code:
Code: |
PDBReader pdbReader = new PDBReader();
String filename = "./pdb1a07.ent";
String outputfilename = "./export.sdf";
InputStream is;
OutputStream os;
MolInputStream mis;
MacroMolecule macroMol;
ComponentIterator compIt;
Component comp;
Molecule ligand;
MolExporter molExp;
os = new FileOutputStream(new File(outputfilename));
molExp = new MolExporter(os, "sdf");
is = new FileInputStream(new File(filename));
mis = new MolInputStream(is);
pdbReader.setInput(mis);
macroMol = pdbReader.read();
compIt = macroMol.getIterator();
while (compIt.hasNext()){
comp = compIt.next();
if (comp instanceof HeteroComponent){
if (((HeteroComponent)comp).isLigand()){
ligand = ((HeteroComponent)comp).getMolecule();
ligand.clean(2, null);
molExp.write(ligand);
}
}
} |
I attached the pdbfile I used for my test (pdb1a07.ent) and the expected ligand (ligand.mol).
export.sdf is the generated SDF.
I retrieve ACETYL GROUP and DIPENTYLAMINE but not the PHOSPHOTYROSINE and these groups are not connected so I don't have the ligand but different parts of the ligand.
Is there a way to have the molecule as in ligand.mol
Best regards
Severine
ChemAxon efa1591b5a
21-03-2007 17:09:54
We will need to investigate the reason why this particular ligand was not recognised as one entity. It's certainly a bug that will be fixed in a forthcoming release of Marvin.
Regards,
Miklos
User 86810cf9fa
03-04-2007 08:19:07
Hello Miklos,
I just would like to know wether you have already found why the ligand is not recognized.
Best regards,
Severine
ChemAxon efa1591b5a
04-04-2007 07:28:57
Dear Severine,
yes, we managed to identify the root of the problem you reported. We have found two major independent bugs:
1. PHOSPHOTYROSINE is recognised as a modified residue and therefore it is classified as part of the protein.
2. A glutamic acid residue that is part of the ligand is also classified as part of the protein.
A further issue is related to the CHAINS record in this particular PDB file: the ligands are also denoted as chains (chain C and D) - this also fools the PDB importer.
Similar problem is caused by the corresponding SEQRES records (of chains C and D).
Due to the above problems the ligand is not properly connected.
Both bugs will be corrected.
Since then the same problem was found in other PDB files, e.g. in 1ETS.pdb (thrombin), where NAPAP is not recognised as one entity.
The bug fixes will be available in the next patch release of Marvin which will be out within few weeks.
Until then I cannot recommend any other workaround than manually editing the PDB file to better represent the twoligands. Please let me know if I can be of any help in this.
Regards,
Miklos
User 86810cf9fa
04-04-2007 13:00:44
Dear Miklos
I tried the same code with 1FAP.pdb but all the bonds are on "Any" form (see 1FAP.mol). But the ligand contains up, down, simple and double bonds.
How can I transform Any bonds to the real bonds type?
Best regards.
Severine
ChemAxon efa1591b5a
05-04-2007 14:03:35
Hi Severine,
how did you create the mol file? I tried Save as in MarvinSpace (just right click on RAP - the ligand in 1FAP) and got a mol file with proper bond information, see it atached.
What do you mean by up, down bonds? - stereo information is not stored in the PDB file. Actually, even bond type is not stored, it is recognised by our PDB import module - which may mismatch bond type in some cases.
If you tell me more about how you tried to get the mol file I may give you more specific advise.
Thanks and regards,
Miklos
User 86810cf9fa
05-04-2007 17:10:16
I am using the code below with a modification to remove all the alias:
Code: |
while (compIt.hasNext()){
comp = compIt.next();
if (comp instanceof HeteroComponent){
if (((HeteroComponent)comp).isLigand()){
ligand = ((HeteroComponent)comp).getMolecule();
ligand.clean(2, null);
for (int i = 0; i < ligand.getAtomCount(); i++){
ligand.getAtom(i).setAliasstr(null);
}
molExp.write(ligand);
System.out.println(ligand.toFormat("mol"));
}
}
}
|
I have to convert the molecule from 3D to 2D but I want to keep the stereo.
Best Regards
Séverine
ChemAxon efa1591b5a
06-04-2007 14:33:05
Right, now I see what you mean. I talk to the stereo guys, I am not sure what options in clean2d need to be specified in order to preserve stereo information. I'll get back as soon as I hear something from them.
Regards,
Miklos
ChemAxon 25dcd765a3
06-04-2007 17:06:11
There is a bug in the stereo calculation in case of lone electron pairs (LP).
Thank you for the report, we have also found this bug and working on the solution.
Until then you can overcome the problem if you remove this lone electron pairs.
Andras
User 86810cf9fa
23-05-2007 16:59:12
Hi Miklos and Andras,
I just would like to know if you found a solution for my issue and wether the next version will contain the bug fixes.
Thank you very much.
Best regards,
Severine
ChemAxon 25dcd765a3
23-05-2007 19:38:36
The stereo fix is already out.
Have you tried with Marvin 4.1.8 ?
(As far as I remember the 4.1.7 also contains the fix.)
Please let us know if the fix was not complete in some question.
Andras
User 86810cf9fa
24-05-2007 07:49:14
Hi Andras,
Using the same code as below and Marvin 4.1.8, I have the same molecule with bond type "Any":
Code: |
RAP (RAPAMYCIN IMMUNOSUPPRESSANT DRUG)
Marvin 05240709242D
68 71 0 0 0 0 999 V2000
2.1746 0.5024 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.8424 1.2409 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
2.8867 0.9338 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
2.3470 -0.3077 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0535 0.1115 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.7730 -0.2925 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.7896 -1.1170 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0910 -1.5390 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.3470 -1.1422 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
2.1362 -1.9761 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.9305 -2.2166 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1.7511 -2.7519 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.5739 -2.8117 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1.2170 -3.4432 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.5766 -3.8361 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
2.0427 -3.4554 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1.5765 -4.2388 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.1660 -4.9960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3320 -4.9779 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.0805 -4.2566 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.8809 -4.4608 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.7074 -4.4985 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5683 -5.3285 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-2.5243 -4.3489 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.2861 -4.0337 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.9590 -3.5632 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.5178 -2.9572 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.9361 -2.2399 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.1896 -1.4476 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.2654 -0.6184 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.1608 0.2041 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.8827 0.9815 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.4413 1.6792 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.1394 2.1093 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-3.8637 2.2694 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.4850 2.8189 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-3.1693 2.7195 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.5956 3.4287 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-2.3950 3.0118 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5769 3.1258 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7584 3.0674 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0261 2.8336 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.3831 3.5870 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
0.7428 2.4335 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.3602 1.8901 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.9386 2.4761 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.7552 2.3196 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.3646 2.8669 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.1552 2.6286 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
4.7585 3.1934 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.5114 2.8533 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
4.5699 3.9933 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.2532 4.4585 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
3.7757 4.2287 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.1737 3.6633 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.7389 -5.0539 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.7416 -5.1469 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-6.0896 -0.5927 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.6449 1.3038 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.5465 3.8300 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.6728 3.8959 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.8194 3.3040 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.9053 -5.8119 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.2985 2.9763 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
5.7807 2.0762 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
2.8665 -3.6095 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
-4.3588 3.7523 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
6.0604 4.3017 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 8 0 0 0 0
1 3 8 0 0 0 0
1 4 8 0 0 0 0
2 45 8 0 0 0 0
4 5 8 0 0 0 0
4 9 8 0 0 0 0
5 6 8 0 0 0 0
6 7 8 0 0 0 0
7 8 8 0 0 0 0
8 9 8 0 0 0 0
9 10 8 0 0 0 0
10 11 8 0 0 0 0
10 12 8 0 0 0 0
12 13 8 0 0 0 0
12 14 8 0 0 0 0
14 15 8 0 0 0 0
14 16 8 0 0 0 0
14 17 8 0 0 0 0
15 20 8 0 0 0 0
16 66 8 0 0 0 0
17 18 8 0 0 0 0
17 56 8 0 0 0 0
18 19 8 0 0 0 0
19 20 8 0 0 0 0
20 21 8 0 0 0 0
21 22 8 0 0 0 0
22 23 8 0 0 0 0
22 24 8 0 0 0 0
23 63 8 0 0 0 0
24 25 8 0 0 0 0
24 57 8 0 0 0 0
25 26 8 0 0 0 0
26 27 8 0 0 0 0
27 28 8 0 0 0 0
28 29 8 0 0 0 0
29 30 8 0 0 0 0
30 31 8 0 0 0 0
30 58 8 0 0 0 0
31 32 8 0 0 0 0
32 33 8 0 0 0 0
32 59 8 0 0 0 0
33 34 8 0 0 0 0
33 35 8 0 0 0 0
35 36 8 0 0 0 0
35 37 8 0 0 0 0
36 64 8 0 0 0 0
37 38 8 0 0 0 0
37 39 8 0 0 0 0
38 67 8 0 0 0 0
39 40 8 0 0 0 0
39 60 8 0 0 0 0
40 41 8 0 0 0 0
41 42 8 0 0 0 0
41 61 8 0 0 0 0
42 43 8 0 0 0 0
42 44 8 0 0 0 0
44 45 8 0 0 0 0
45 46 8 0 0 0 0
46 47 8 0 0 0 0
46 62 8 0 0 0 0
47 48 8 0 0 0 0
48 49 8 0 0 0 0
48 55 8 0 0 0 0
49 50 8 0 0 0 0
50 51 8 0 0 0 0
50 52 8 0 0 0 0
51 65 8 0 0 0 0
52 53 8 0 0 0 0
52 54 8 0 0 0 0
53 68 8 0 0 0 0
54 55 8 0 0 0 0
M END
|
Best regards,
Severine
ChemAxon efa1591b5a
24-05-2007 15:06:08
By default, PDBReader does not set bond types. In order to force PDBReader to guess and set bond types you need to call
Code: |
pdbReader.setFixBondTypes(true); |
I hope this helps.
Regards,
Miklos
User 86810cf9fa
24-05-2007 19:01:04
Hi Miklos,
I add "pdbReader.setFixBondTypes(true);" in my code but it does not seem to work. I have the same result with bond type "Any".
And what about the connection problem? Can you tell me if the next version will correct this?
Best regards,
Severine