Revision e75a54af

b/dockOnSurf.sh
6 6
only_iso=false
7 7
only_ref=false
8 8
coads_box=false
9
removeHs=false
10 9
rmsd_threshold=0.01
11 10

  
12 11
for i in $@; do
......
23 22
      only_ref=true;;
24 23
    -b|--coadsorption-box)
25 24
      coads_box=true;;
26
    -H|--remove-Hs)
27
      removeHs=true;;
28 25
    -t=*|--rmsd-threshold=*)
29 26
      rmsd_threshold="${i#*=}";;
30 27
  esac
......
40 37
  -b, --coadsorption-box \t When the surface file already contains an
41 38
\t \t \t \t adsorbed molecule, it creates a box around it to
42 39
\t \t \t \t prevent the second adsorbate to overlap the first.
43
  -H, --remove-Hs \t \t Remove hydrogens for the RMSD comparison.
44 40
  -t=NUM, --rmsd-threshold=NUM \t Sets the threshold for the RMSD check of 
45 41
\t \t \t \t different structures."
46 42
  exit
......
94 90
if [ "$only_ads" = false ] && [ "$only_ref" = false ] ; then
95 91
	### Generation des conformeres
96 92

  
97
  ${DockOnSurf_path}/modules/generation_conformeres.py $molecule 5000 $removeHs $rmsd_threshold
93
  ${DockOnSurf_path}/modules/generation_conformeres.py $molecule 5000 $rmsd_threshold
98 94
  echo ' -- CONFORMERS HAVE BEEN GENERATED --'
99 95

  
100 96
  ### Conversion des fichiers .mol en .xyz
b/modules/generation_conformeres.py
32 32

  
33 33
mol_input = sys.argv[1]  #nom du fichier d'entree
34 34
n = int(sys.argv[2])  #nombre de conformeres
35
remove_hydrogens = sys.argv[3].lower() in ("yes", "true", "t", "1") # converts the input argument to a boolean
36
rmsd_threshold = float(sys.argv[4])
35
rmsd_threshold = float(sys.argv[3])
37 36

  
38 37
m = Chem.MolFromMolFile('%s/%s.mol' % (Molecule_path, mol_input))  #lecture du fichier d'entree
39 38

  
......
58 57
print 'Detection of identical conformers'
59 58

  
60 59
liste_suppr = []
61
if remove_hydrogens:
62
    m = Chem.RemoveHs(m)
63

  
64 60
for a in range(0,n): 
65 61
    for b in range (a+1,n):
66 62
        if a in liste_suppr:
67 63
            break
68 64
        else :
69 65
            if a != b :
70
                valeur = AllChem.GetBestRMS(m, m, prbId=b, refId=a) 
66
                valeur = AllChem.GetConformerRMS(m, a, b, prealigned=False) 
71 67
                if valeur < rmsd_threshold: #valeur de RMSD limite en dessous de laquelle les conformeres sont consideres comme identiques
72 68
                    liste_suppr.append(a)
73 69

  

Also available in: Unified diff