示例#1
0
###FOR FURTHER INSTRUCTIONS PLEASE REFER TO alternateresidues.py SAMPLE FILE
#SAMPLE COMMAND :
# python cycle.py -amino_libs "../gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib" -pdb "../../../Downloads/1.pdb" -prep "../gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep" &> output_file_name

import sys
sys.path.insert(0, '../')
import gmml
import time
het = gmml.string_vector()
amino_libs = gmml.string_vector()
pdb_file = ''
prep_file = ''
if len(sys.argv) < 2:
    print(
        'Please import one pdb file using -pdb option, one prep file using -prep option  and (optionally) amino library file(s) using -amino_libs option'
    )
elif sys.argv[1] == '-amino_libs':
    arguments = sys.argv[2].split(',')
    for argument in arguments:
        amino_libs.push_back(argument)
    if len(sys.argv) < 4:
        print(
            'Please import one pdb file using -pdb option and one prep file using -prep option'
        )
    elif sys.argv[3] == '-pdb':
        pdb_file = sys.argv[4]
        if (len(sys.argv) < 6):
            print('Please import one prep file using -prep option')
        elif sys.argv[5] == '-prep':
            prep_file = sys.argv[6]
    elif sys.argv[3] == '-prep':
示例#2
0
###FOR FURTHER INSTRUCTIONS PLEASE REFER TO alternateresidues.py SAMPLE FILE
#SAMPLE COMMAND :
# python aminoacidchains.py -amino_libs "gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminoct12.lib" -prep "gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep" -pdb "gmml/example/pdb/1Z7E.pdb"

#If you need to add other libraries for glycam there is -glycam_libs option available for the command.

import sys
sys.path.insert(0, '../')
import gmml

temp = gmml.PdbPreprocessor()
amino_libs = gmml.string_vector()
glycam_libs = gmml.string_vector()
prep = gmml.string_vector()

if sys.argv[1] == '--help':  
	print 'Available options:'
	print '-amino_libs : amino acid library file(s) (e.g. gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib)'
	print '-glycam_libs: glycam library file(s)'
	print '-other_libs : other kinds of library files'
	print '-prep       : prep file(s) (e.g. gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep)'
	print '-pdb        : pdb file (e.g. gmml/example/pdb/1RVZ_New.pdb)'
	print '-cnf        : configuration file as an argument. sample file format:'
	print 'amino_libs'
	print 'gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib'
	print 'gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib'
	print 'glycam_libs'
	print 'other_libs'
	print 'prep'
	print 'gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep'
	print 'pdb'
示例#3
0
###SAMPLE COMMAND
# python residueinfo.py -amino_libs "gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminoct12.lib" -prep "gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep" -pdb "gmml/example/pdb/1NXC.pdb"

#If you need to add other libraries for glycam and other residues there are -glycam_libs and -other_libs options available for the command.

###IMPORTING THE GMML LIBRARY

import sys
sys.path.insert(0, '../')
import gmml

temp = gmml.PdbPreprocessor()
amino_libs = gmml.string_vector()
glycam_libs = gmml.string_vector()
other_libs = gmml.string_vector()
prep = gmml.string_vector()

if sys.argv[1] == '--help':
    print 'Available options:'
    print '-amino_libs : amino acid library file(s) (e.g. gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib)'
    print '-glycam_libs: glycam library file(s)'
    print '-other_libs : other kinds of library files'
    print '-prep       : prep file(s) (e.g. gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep)'
    print '-pdb        : pdb file (e.g. gmml/example/pdb/1RVZ_New.pdb)'
    print '-cnf        : configuration file as an argument. sample file format:'
    print 'amino_libs'
    print 'gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib'
    print 'gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib'
    print 'glycam_libs'
    print 'other_libs'
    print 'prep'
示例#4
0
###FOR FURTHER INSTRUCTIONS PLEASE REFER TO alternateresidues.py SAMPLE FILE
#SAMPLE COMMAND :
# python gapsinaminoacidchains.py -amino_libs "gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib","gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminoct12.lib" -pdb "gmml/example/pdb/1Z7E.pdb"

import sys
sys.path.insert(0, '../')
import gmml

temp = gmml.PdbPreprocessor()
amino_libs = gmml.string_vector()


if sys.argv[1] == '--help':  
	print("""
Available options:
        -amino_libs : amino acid library file(s) (e.g. gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib)
        -glycam_libs: glycam library file(s)
        -other_libs : other kinds of library files
        -prep       : prep file(s) (e.g. gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep)
        -pdb        : pdb file (e.g. gmml/example/pdb/1RVZ_New.pdb)
        -cnf        : configuration file as an argument. 
            Sample file format:
                amino_libs 
                gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib
                gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/aminont12.lib
                glycam_libs
                other_libs
                prep
                gmml/dat/CurrentParams/leaprc_GLYCAM_06j-1_2014-03-14/GLYCAM_06j-1.prep
                pdb
                gmml/example/pdb/1RVZ_New.pdb
                                                    sys.argv[6], True)
        pdb_file = assembly.BuildPdbFileStructureFromAssembly()
        pdb_file.Write('pdb_file.pdb')
        print 'Charge: ' + str(assembly.GetTotalCharge())
        condensed_sequence = gmml.CondensedSequence(sys.argv[2])
        rotamers_glycosidic_angles_info = condensed_sequence.GetCondensedSequenceRotamersAndGlycosidicAnglesInfo(
            condensed_sequence.GetCondensedSequenceResidueTree())

        # Remove tg rotamer of OMEGA angle for 'DGalpA1-6DGlcpA' linkage if exists in selected rotamers for the specific linkage
        new_rotamers_glycosidic_angles_info = gmml.rotamer_angle_info_vector()
        for rotamers_name, rotamers_info in rotamers_glycosidic_angles_info:
            if rotamers_name == 'DGalpA1-6DGlcpA':
                new_selected_rotamers = gmml.string_vector_string_pair_vector()
                for sr_name, sr_val in rotamers_info.selected_rotamers_:
                    if sr_name == 'omega':
                        new_omega_selected_rotamers = gmml.string_vector()
                        for val in sr_val:
                            if val != 'tg':
                                new_omega_selected_rotamers.push_back(val)
                        new_selected_rotamers.push_back(
                            [sr_name, new_omega_selected_rotamers])
                    else:
                        new_selected_rotamers.push_back([sr_name, sr_val])
                rotamers_info.selected_rotamers_ = new_selected_rotamers
            new_rotamers_glycosidic_angles_info.push_back(
                [rotamers_name, rotamers_info])
        rotamers_glycosidic_angles_info = new_rotamers_glycosidic_angles_info

        # Add tg rotamer of OMEGA for 'DGalpA1-6DGlcpA' linkage if tg is one of the possible rotamers for the specifi linkage
        new_rotamers_glycosidic_angles_info = gmml.rotamer_angle_info_vector()
        for rotamers_name, rotamers_info in rotamers_glycosidic_angles_info:
示例#6
0
import sys

sys.path.insert(0, '../')
import gmml
import time

empty_vector = gmml.string_vector()
preps = gmml.string_vector()
preps.push_back(sys.argv[2])
assembly = gmml.Assembly()
assembly.BuildAssemblyFromPdbFile(sys.argv[1], empty_vector, empty_vector,
                                  empty_vector, preps, sys.argv[3])
assembly.BuildStructureByDistance(1)
output = assembly.BuildPrepFileStructureFromAssembly(sys.argv[3])
output.Write(sys.argv[4])
示例#7
0
文件: cycle.py 项目: GLYCAM-Web/gems
###FOR FURTHER INSTRUCTIONS PLEASE REFER TO alternateresidues.py SAMPLE FILE
#SAMPLE COMMAND :
# python cycle.py -amino_libs "../gmml/dat/CurrentParams/leaprc.ff12SB_2014-04-24/amino12.lib" -pdb "../../../Downloads/1.pdb" &> output_file_name


import sys
sys.path.insert(0, '../')
import gmml
import time
het = gmml.string_vector()
amino_libs = gmml.string_vector()
pdb_file = ''
if len(sys.argv) < 2:
	print('Please import one pdb file using -pdb option and (optionally) amino library file(s) using -amino_libs option')
elif sys.argv[1] == '-amino_libs': 
	arguments = sys.argv[2].split(',')
	for argument in arguments:
		amino_libs.push_back(argument)
	if len(sys.argv) < 4:
		print('Please import one pdb file using -pdb option')
	elif sys.argv[3] == '-pdb':
		pdb_file = sys.argv[4]
elif sys.argv[1] == '-pdb':
	pdb_file = sys.argv[2]
	if len(sys.argv) > 3:
		if sys.argv[3] == '-amino_libs':
			arguments = sys.argv[4].split(',')
			for argument in arguments:
				amino_libs.push_back(argument)
else:
	print('Please import one pdb file using -pdb option and (optionally) amino library file(s) using -amino_libs option')
		print sys.argv[2],' is valid'
		assembly.BuildAssemblyFromCondensedSequence(sys.argv[2], sys.argv[4], sys.argv[6], True)
		pdb_file = assembly.BuildPdbFileStructureFromAssembly()
		pdb_file.Write('pdb_file.pdb')
		print 'Charge: ' + str(assembly.GetTotalCharge())
		condensed_sequence = gmml.CondensedSequence(sys.argv[2])
		rotamers_glycosidic_angles_info = condensed_sequence.GetCondensedSequenceRotamersAndGlycosidicAnglesInfo(condensed_sequence.GetCondensedSequenceResidueTree())

		# Remove tg rotamer of OMEGA angle for 'DGalpA1-6DGlcpA' linkage if exists in selected rotamers for the specific linkage
		new_rotamers_glycosidic_angles_info = gmml.rotamer_angle_info_vector()
		for rotamers_name, rotamers_info in rotamers_glycosidic_angles_info:
			if rotamers_name == 'DGalpA1-6DGlcpA':
				new_selected_rotamers = gmml.string_vector_string_pair_vector()
				for sr_name, sr_val in rotamers_info.selected_rotamers_:
					if sr_name == 'omega':
						new_omega_selected_rotamers = gmml.string_vector()
						for val in sr_val:
							if val != 'tg':
								new_omega_selected_rotamers.push_back(val)
						new_selected_rotamers.push_back([sr_name, new_omega_selected_rotamers])
					else:
						new_selected_rotamers.push_back([sr_name, sr_val])				
				rotamers_info.selected_rotamers_ = new_selected_rotamers
			new_rotamers_glycosidic_angles_info.push_back([rotamers_name, rotamers_info])
		rotamers_glycosidic_angles_info = new_rotamers_glycosidic_angles_info

		# Add tg rotamer of OMEGA for 'DGalpA1-6DGlcpA' linkage if tg is one of the possible rotamers for the specifi linkage
		new_rotamers_glycosidic_angles_info = gmml.rotamer_angle_info_vector()
		for rotamers_name, rotamers_info in rotamers_glycosidic_angles_info:
			if rotamers_name == 'DGalpA1-6DGlcpA':
				is_possible = False
import sys
sys.path.insert(0, '../')
import gmml
temp = gmml.Assembly()

### ring_type can be "P" or "F"
### orientations can be "Up" or "Down" which shows the position of the exocyclic atoms with respect to the ring
### anomeric_orientation: orientation of the exocyclic oxygen/nitrogen attached to the anomeric carbon of the ring
### anomeric_side_carbon_orientation: orientation of the exocyclic carbon attached to the anomeric carbon of the ring
### index_two_orientation: orientation of the exocyclic oxygen/nitrogen attached to the second carbon of the ring
### index_three_orientation: orientation of the exocyclic oxygen/nitrogen attached to the third carbon of the ring
### index_four_orientation: orientation of the exocyclic oxygen/nitrogen attached to the fourth carbon of the ring (specific to pyranoses)
### last_c_orientation: orientation of the exocyclic oxygen/nitrogen attached to the last carbon of the ring

### In the following lines the 3D structure of the first sugar is being defiend based on the orientation of the exocyclic atoms with respect to the ring
structure1 = gmml.string_vector()
### Change the following line based on the ring type (P or F)
structure1.push_back("P")
### Change the following line based on the orientation of the exocyclic oxygen/nitrogen attached to the anomeric carbon of the ring. leave "" if don't want to specify.
structure1.push_back("Up")
### Change the following line based on the orientation of the exocyclic carbon attached to the anomeric carbon of the ring. leave "" if don't want to specify.
structure1.push_back("")
### Change the following line based on the orientation of the exocyclic oxygen/nitrogen attached to the second carbon of the ring. leave "" if don't want to specify.
structure1.push_back("Down")
### Change the following line based on the orientation of the exocyclic oxygen/nitrogen attached to the third carbon of the ring. leave "" if don't want to specify.
structure1.push_back("Up")
### Change the following line based on the orientation of the exocyclic oxygen/nitrogen attached to the fourth carbon of the ring (specific to pyranoses). leave "" if don't want to specify.
structure1.push_back("Down")
### Change the following line based on the orientation of the exocyclic oxygen/nitrogen attached to the third carbon of the ring. leave "" if don't want to specify.
structure1.push_back("Up")
示例#10
0
import sys
sys.path.insert(0, '../')
import gmml
import time

empty_vector = gmml.string_vector()
preps = gmml.string_vector()
preps.push_back(sys.argv[2])
assembly = gmml.Assembly()
assembly.BuildAssemblyFromPdbFile(sys.argv[1], empty_vector, empty_vector, empty_vector, preps, sys.argv[3])
assembly.BuildStructureByDistance(1)
output = assembly.BuildPrepFileStructureFromAssembly(sys.argv[3])
output.Write(sys.argv[4])