Dear OB List
I'm new on the mailing list and looking forward to good discussions.

Currently, we're trying to optimize a single side which we mutated in a 
protein using the below OB code (python). However, apparently the 
routines run out of memory. We use a protonated version of the 1LBS.pdb 
file (the unprotonated one seems to work). I believe its the size of the 
system which is too large. Can this be?
What is the maximum atom number available the OBForceField methods?

Thanks for any hints.

  #!/usr/bin/env python

  # ******************************
  # OpenBabel local minimization
  # Credit: Kasper Thofte
  # ..............................

  # ******************************
  # Variables:
  num_grad_steps = 50
  file_name_ini = 'test_ini.pdb'
  file_name_opt = 'test_opt.pdb'
  # (its not prefectly clear what these identifiers refer to)
  movable = [653,661,662,656,663,662,657,665,664,658,660,659]
  forceField = 'MMFF94'
  informat, outformat = 'pdb', 'pdb'
  # ..............................


  # ******************************
  # Setup
  from openbabel import *
  conv = OBConversion()
  conv.SetInAndOutFormats(informat, outformat)
  mol = OBMol()
  conv.ReadFile(mol, file_name_ini)
  cnstr = OBFFConstraints()
  # ..............................


  # ******************************
  # Define constraints
  FF = OBForceField.FindForceField(forceField)
  FF.Setup(mol)
  for atom in OBMolAtomIter(mol):
      Anum = atom.GetIdx()
      if Anum not in movable:
          cnstr.AddAtomConstraint(Anum)
      print Anum
  # ..............................


  # ******************************
  # Optimization
  FF.SetConstraints(cnstr)
  FF.ConjugateGradients(num_grad_steps)
  FF.GetCoordinates(mol)
  for atom in OBMolAtomIter(mol):
      print atom.GetAtomicNum(), atom.GetX(), atom.GetY(), atom.GetZ()
  # ..............................


  # ******************************
  # Write optimized file
  conv.WriteFile(mol, file_name_opt)
  # ..............................



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to